Showing posts with label value. Show all posts
Showing posts with label value. Show all posts

Thursday, March 29, 2012

Error loading value

I have been getting the error below from an SSIS Package that has been running successfully in production for 2 Months. Also, this started after we installed SP2. We had errors durring the SP2 installation durring the Notification Services and Workstation Tools install but the installation program reported that the installations were successfull so I am not sure if this is related.

Here is the error message:

Date 6/12/2007 4:53:12 PM
Log Job History (SchedulerEMailer)

Step ID 1
Server MISSRV7
Job Name SchedulerEMailer
Step Name new step
Duration 00:00:08
Sql Severity 0
Sql Message ID 0
Operator Emailed
Operator Net sent
Operator Paged
Retries Attempted 0

Message
Executed as user: XSRV7\SYSTEM. Microsoft (R) SQL Server Execute Package Utility Version 9.00.3042.00 for 32-bit Copyright (C) Microsoft Corp 1984-2005. All rights reserved. Started: 4:53:12 PM Error: 2007-06-12 16:53:19.90 Code: 0xC0010018 Source: Description: Error loading value "<DTS:LogProvider xmlnsBig SmileTS="
www.microsoft.com/SqlServer/Dts"><DTSStick out tongueroperty DTS:Name="ConfigString">MISSRV7.SSISConfig.ssisuser</DTSStick out tongueroperty><DTSStick out tongueroperty DTS:Name="DelayValidation">0</DTSStick out tongueroperty><DTSStick out tongueroperty DTS:Name="ObjectName">SSIS log provider for " from node "DTS:LogProvider". End Error Could not load package "\ApptEmailer" because of error 0xC0010014. Description: One or more error occurred. There should be more specific errors preceding this one that explains the details of the errors. This message is used as a return value from functions that encounter errors. Source: Started: 4:53:12 PM Finished: 4:53:19 PM Elapsed: 7 seconds. The package could not be loaded. The step failed.

Any help would be greatly appreciated!!!

One problem that can possibly lead to this error is described in this KB:

http://support.microsoft.com/default.aspx/kb/913817

Please check if it affects your installation.

|||Hi

I am receiving this same error. Did you ever resolve it?

Thanks in advance

Error level and expressions

In a report, I have the expression :

=iif(Sum( Fields!X_A_1.Value)<>0,(Sum( Fields!X_A.Value)-Sum( Fields!X_A_1.Value))/Sum( Fields!X_A_1.Value),"NA")

This expression product the error

"The value expression for the textbox ‘textbox12’ contains an error: Attempted to divide by zero."

I think it's because reporting execute the expression
(Sum( Fields!X_A.Value)-Sum( Fields!X_A_1.Value))/Sum( Fields!X_A_1.Value)

even if X_A_1 is equal to 0.

I would like reporting to display NA and not "#Error" when X_A_1 = 0

Is there is a way to catch the error in reporting?

Is there is a way for reporting not to execute the expression

(Sum( Fields!X_A.Value)-Sum( Fields!X_A_1.Value))/Sum( Fields!X_A_1.Value)

when X_A_1 is equal to 0.

Sorry if my english is not very good

Note: IIF() is a function call and evaluates all arguments (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vblr7/html/vafctiif.asp)

Instead of the pattern =IIF(Y=0, A, X/Y), use =IIF(Y=0, A, X / IIF(Y=0, 1, Y)) to avoid the division by zero.

-- Robert

Monday, March 26, 2012

Error Including null value in a Numeric field

Hi All,

I'm migrating some SQL 2000 DTS to SSIS.

I am transfering data from a DB2 table to a SQL 2005 table using the OLE DB Source, Data Converstion then the OLE DB Destionation.

So, I have a numeric (Precision 3, Scale 2) field with NULL value in the DB2 table.

I'm trying to transfer these data to a SQL2005 table and I am receiving this error message below:

"[Destination Table TFACIL [18]] Error: There was an error with input column "COMB_OPPT_PRCT" (2865) on input "OLE DB Destination Input" (31). The column status returned was: "The value violated the integrity constraints for the column.". "

The field must accept null because of the APPLICATION ( i can't change it, im not the owner ).

Could someone help me?

Thanks in advance.

Regards,

Thiago

Check that the SQL table TFACIL.COMB_OPPT_PRCT

1) Has no CHECK constraints on it that would prevent NULL being loaded

2) is not defined as NOT NULL

Thursday, March 22, 2012

error in using the IFF statment

Hi,
I used=IFF( Fields!used.Value=False, 'Fields!s_Count.Value','0')in my column and it shows an error. The error is as below...


c:\projects\ics\report ics 1\Stock Balance Report.rdl The value expression for the textbox 's_Count' contains an error: [BC30451] Name 'IFF' is not declared.
What does it mean that the 'IFF' is not declared? Does anyone know why..?


Hi, u can easily write the iif Condition... I am giving some Examples.....
=IFF( Fields!used.Value=False, 'Fields!s_Count.Value','0') (ur Statement)
As
=IFF( Fields!used.Value=False,Fields!s_Count.Value,"0") "Write One" Note: Don't use single Quotes ...use Double Quotes...(just as vb syntax)
and Some Examples:
1) =iif(Fields!MainNo.Value is Nothing or Fields!MainNo.Value = "",Fields!SRNo.Value,Fields!MainNo.Value)
2) Switch: and If U Want to Check Multiple Conditions u can use like this....

=Switch(
ucase(First(Fields!priorityid.Value))="LM","Lunch Motion",
ucase(First(Fields!priorityid.Value))="M","Motion",
ucase(First(Fields!priorityid.Value))="O","Oridanry",ucase(First(Fields!priorityid.Value))="FLC","Fair List Cases",
ucase(First(Fields!priorityid.Value))="S","Supplemental")


ok......then u can check if u have still errors Mail Me....praveenk_dotnet@.yahoo.com
|||How about IIF ?

Wednesday, March 21, 2012

Error In SQL Statement

Hi, I m Trying TO use A sql insert Query but it showing an error

i m trying to insert value in Filed Name PNR from Str.text and Coresspond Field Name PNR1 valuse is 1 less than from pnr.text and PNR1 is a Auto Number Field

my code for insert query is

Dim q1As OleDb.OleDbCommand =New OleDb.OleDbCommand("insert into res (PNR) values('" & Str.Text & "') where PNR1='" & pnr.Text - 1 & " ' ", con)

and Error is Shown by browser is as follows

Server Error in '/WebApplication1' Application.

Missing semicolon (;) at end of SQL statement.

Description:An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details:System.Data.OleDb.OleDbException: Missing semicolon (;) at end of SQL statement.

Source Error:

Line 466: con.Open()Line 467: Dim q1 As OleDb.OleDbCommand = New OleDb.OleDbCommand("insert into res (PNR) values('" & Str.Text & "') where PNR1='" & pnr.Text - 1 & " ' ", con)Line 468: q1.ExecuteNonQuery()Line 469: con.Close()Line 470: End Sub


Source File:C:\Inetpub\wwwroot\WebApplication1\2.aspx.vb Line:468

Stack Trace:

[OleDbException (0x80040e14): Missing semicolon (;) at end of SQL statement.] System.Data.OleDb.OleDbCommand.ExecuteCommandTextErrorHandling(Int32 hr) +41 System.Data.OleDb.OleDbCommand.ExecuteCommandTextForSingleResult(tagDBPARAMS dbParams, Object& executeResult) +174 System.Data.OleDb.OleDbCommand.ExecuteCommandText(Object& executeResult) +92 System.Data.OleDb.OleDbCommand.ExecuteCommand(CommandBehavior behavior, Object& executeResult) +65 System.Data.OleDb.OleDbCommand.ExecuteReaderInternal(CommandBehavior behavior, String method) +112 System.Data.OleDb.OleDbCommand.ExecuteNonQuery() +66 WebApplication1._2.Button2_Click(Object sender, EventArgs e) in C:\Inetpub\wwwroot\WebApplication1\2.aspx.vb:468 System.Web.UI.WebControls.Button.OnClick(EventArgs e) +108 System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +57 System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +18 System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +33 System.Web.UI.Page.ProcessRequestMain() +1277



Version Information: Microsoft .NET Framework Version:1.1.4322.573; ASP.NET Version:1.1.4322.573

I have to ask this, even though it seems so simple. Since the error says the query is missing a semi-colon at the end of the SQL statement, did you add a semi-colon and test it?

Jeff

|||

Is this SQL Server or Access?

In any case, your syntax is incorrect. Using a WHERE clause on an INSERT statement is invalid.

Also, use Parameters instead of concatenating UI-supplied text to SQL statements which will be executed.

|||

Try modify you q1 definition.

does you pnr contain number and you would like to subtract 1 from it?

you have to cast you pnr. to integer next subtract 1 and next convert result to string and insert it into query or do it this way:

Dim q1 As OleDb.OleDbCommand = New OleDb.OleDbCommand("insert into res (PNR) values('" & Str.Text & "') where PNR1=(" & pnr.Text & "-1) ",

Thanks

Wednesday, March 7, 2012

Error in inserting value by trigger in linked server

Hi Pls help me
I have 2 db servers and its a lnked server
while am inserting value in source table (table having a trigger to raise ti
other table in defferent server) i am facing this error and Data is not
getting inserted.
error is
- Unable to preserve trigger 'InsertIntoHPD_HelpDesk'.
ODBC error: [Microsoft][ODBC SQL Server Driver][SQL Server]The operation
could not be performed because the OLE DB provider 'SQLOLEDB' was unable to
begin a distributed transaction.
[Microsoft][ODBC SQL Server Driver][SQL Server][OLE/DB provider returned
message: New transaction cannot enlist in the specified transaction
coordinator. ]
regards
KRP
Do you have the Distributed Transaction Coordinator running? On SQL Server
2000 it is one of the services in the SQL Server suite along with SQL Server
and SQL Agent.
RLF
"KRP" <KRP @.discussions.microsoft.com> wrote in message
news:8C37B85A-951E-414C-A6BA-9D7BBFC039D0@.microsoft.com...
> Hi Pls help me
> I have 2 db servers and its a lnked server
> while am inserting value in source table (table having a trigger to raise
> ti
> other table in defferent server) i am facing this error and Data is not
> getting inserted.
> error is
> - Unable to preserve trigger 'InsertIntoHPD_HelpDesk'.
> ODBC error: [Microsoft][ODBC SQL Server Driver][SQL Server]The operation
> could not be performed because the OLE DB provider 'SQLOLEDB' was unable
> to
> begin a distributed transaction.
> [Microsoft][ODBC SQL Server Driver][SQL Server][OLE/DB provider returned
> message: New transaction cannot enlist in the specified transaction
> coordinator. ]
> regards
> KRP
|||Yes,
Its already started and every pre conf hasbeen done..
Please Can you send me a steps of creating a linked server?
Thanks
KRp
"Russell Fields" wrote:

> Do you have the Distributed Transaction Coordinator running? On SQL Server
> 2000 it is one of the services in the SQL Server suite along with SQL Server
> and SQL Agent.
> RLF
> "KRP" <KRP @.discussions.microsoft.com> wrote in message
> news:8C37B85A-951E-414C-A6BA-9D7BBFC039D0@.microsoft.com...
>
>

Error in inserting value by trigger in linked server

Hi Pls help me
I have 2 db servers and its a lnked server
while am inserting value in source table (table having a trigger to raise ti
other table in defferent server) i am facing this error and Data is not
getting inserted.
error is
- Unable to preserve trigger 'InsertIntoHPD_HelpDesk'.
ODBC error: [Microsoft][ODBC SQL Server Driver][SQL Server]The o
peration
could not be performed because the OLE DB provider 'SQLOLEDB' was unable to
begin a distributed transaction.
[Microsoft][ODBC SQL Server Driver][SQL Server][OLE/DB provi
der returned
message: New transaction cannot enlist in the specified transaction
coordinator. ]
regards
KRPDo you have the Distributed Transaction Coordinator running? On SQL Server
2000 it is one of the services in the SQL Server suite along with SQL Server
and SQL Agent.
RLF
"KRP" <KRP @.discussions.microsoft.com> wrote in message
news:8C37B85A-951E-414C-A6BA-9D7BBFC039D0@.microsoft.com...
> Hi Pls help me
> I have 2 db servers and its a lnked server
> while am inserting value in source table (table having a trigger to raise
> ti
> other table in defferent server) i am facing this error and Data is not
> getting inserted.
> error is
> - Unable to preserve trigger 'InsertIntoHPD_HelpDesk'.
> ODBC error: [Microsoft][ODBC SQL Server Driver][SQL Server]The
operation
> could not be performed because the OLE DB provider 'SQLOLEDB' was unable
> to
> begin a distributed transaction.
> [Microsoft][ODBC SQL Server Driver][SQL Server][OLE/DB pro
vider returned
> message: New transaction cannot enlist in the specified transaction
> coordinator. ]
> regards
> KRP|||Yes,
Its already started and every pre conf hasbeen done..
Please Can you send me a steps of creating a linked server?
Thanks
KRp
"Russell Fields" wrote:

> Do you have the Distributed Transaction Coordinator running? On SQL Serve
r
> 2000 it is one of the services in the SQL Server suite along with SQL Serv
er
> and SQL Agent.
> RLF
> "KRP" <KRP @.discussions.microsoft.com> wrote in message
> news:8C37B85A-951E-414C-A6BA-9D7BBFC039D0@.microsoft.com...
>
>

Error in inserting value by trigger in linked server

Hi Pls help me
I have 2 db servers and its a lnked server
while am inserting value in source table (table having a trigger to raise ti
other table in defferent server) i am facing this error and Data is not
getting inserted.
error is
- Unable to preserve trigger 'InsertIntoHPD_HelpDesk'.
ODBC error: [Microsoft][ODBC SQL Server Driver][SQL Server]The operation
could not be performed because the OLE DB provider 'SQLOLEDB' was unable to
begin a distributed transaction.
[Microsoft][ODBC SQL Server Driver][SQL Server][OLE/DB provider returned
message: New transaction cannot enlist in the specified transaction
coordinator. ]
regards
KRPDo you have the Distributed Transaction Coordinator running? On SQL Server
2000 it is one of the services in the SQL Server suite along with SQL Server
and SQL Agent.
RLF
"KRP" <KRP @.discussions.microsoft.com> wrote in message
news:8C37B85A-951E-414C-A6BA-9D7BBFC039D0@.microsoft.com...
> Hi Pls help me
> I have 2 db servers and its a lnked server
> while am inserting value in source table (table having a trigger to raise
> ti
> other table in defferent server) i am facing this error and Data is not
> getting inserted.
> error is
> - Unable to preserve trigger 'InsertIntoHPD_HelpDesk'.
> ODBC error: [Microsoft][ODBC SQL Server Driver][SQL Server]The operation
> could not be performed because the OLE DB provider 'SQLOLEDB' was unable
> to
> begin a distributed transaction.
> [Microsoft][ODBC SQL Server Driver][SQL Server][OLE/DB provider returned
> message: New transaction cannot enlist in the specified transaction
> coordinator. ]
> regards
> KRP|||Yes,
Its already started and every pre conf hasbeen done..
Please Can you send me a steps of creating a linked server?
Thanks
KRp
"Russell Fields" wrote:
> Do you have the Distributed Transaction Coordinator running? On SQL Server
> 2000 it is one of the services in the SQL Server suite along with SQL Server
> and SQL Agent.
> RLF
> "KRP" <KRP @.discussions.microsoft.com> wrote in message
> news:8C37B85A-951E-414C-A6BA-9D7BBFC039D0@.microsoft.com...
> > Hi Pls help me
> >
> > I have 2 db servers and its a lnked server
> > while am inserting value in source table (table having a trigger to raise
> > ti
> > other table in defferent server) i am facing this error and Data is not
> > getting inserted.
> > error is
> > - Unable to preserve trigger 'InsertIntoHPD_HelpDesk'.
> > ODBC error: [Microsoft][ODBC SQL Server Driver][SQL Server]The operation
> > could not be performed because the OLE DB provider 'SQLOLEDB' was unable
> > to
> > begin a distributed transaction.
> > [Microsoft][ODBC SQL Server Driver][SQL Server][OLE/DB provider returned
> > message: New transaction cannot enlist in the specified transaction
> > coordinator. ]
> >
> > regards
> > KRP
>
>

Friday, February 17, 2012

Error Handling/ Stored Procs

Hi,
I'm doing some fairly basic updates with stored procedures. 99% of them affect one row. I've jsut discovered that I can't get the value of @.@.rowcount and @.@.error to return as output parameters (if I check one, the other one gets reset!). My theory is then to return the rowcount and if it's not = 1, then I know I've had a problem. If I begin a transaction in vb.net and call each proc in the required order and check each step that rowcount = 1, is this a reliable method of ensuring no errors have occurred?
Thanks.As far as dealing with both @.@.ROWCOUNT and @.@.ERROR is concerned, this is what I do:
SELECT @.lError = @.@.ERROR, @.lRowCount = @.@.ROWCOUNT

I select the values into local variables in the stored procedure andthen do whatever is needed based on those values. Note that youmust SELECT both values in the same statement, and I *believe* @.@.ERRORmust appear first because it will be reset when @.@.ROWCOUNT is accessed.
In your case, @.lError should be 0 and @.lRowCount should be 1 when a record is inserted correctly.


|||Thanks, I can now get my two values back!

Wednesday, February 15, 2012

Error handling when one field value is bad

Here's an example of what I'm playing with:

update TestTable

set IntValue = Cast(StringValue, as int)

flag =

BEGIN TRY

0

END TRY

BEGIN CATCH

1

END CATCH

I'm trying to take a string value holding an integer and populate an integer field with that value. But, every so often, the string value does not contain an integer (e.g. '13.9" or "CA"). That error would cause the entire column UPDATE to be rolled back. i'm trying to get around it with some kind of "TRY CATCH" construct but I don't believe it can work.

What would you suggest?

Barkingdog

No, you are right this won′t work. For me, the best Exception handling is to prevent exceptions, in your case check the value for being numeric, there is a function ISNUMERIC which can do that for you. But be careful with that function, because it checks for currency numeric only, so the value "$" which is part of a currency expression will also evaluate to true.

See more details on the site: http://www.aspfaq.com/show.asp?id=2390

HTH, jens Suessmeyer.

http://www.sqlserver2005.de