Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
CommandTimeout with ExecScalar
Message
From
05/01/2009 20:15:01
Timothy Bryan
Sharpline Consultants
Conroe, Texas, United States
 
General information
Forum:
ASP.NET
Category:
The Mere Mortals .NET Framework
Environment versions
Environment:
C# 2.0
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01371141
Message ID:
01371261
Views:
12
>>
>>This method just ends up calling SQLCommand.ExecuteScalar(). What does your command look like that you are passing in?
>>Tim
>
>Tim,
>
>Thank you for the replies!
>
>I have not tried this as a stored procedure since I thought I could just use a simple SQL UPDATE command. The command is basically:
>
>sUpdate = "UPDATE tablename SET field = ' " + sValue + " ' WHERE some conditions";
>this.ExecScalar(sUpdate);
>
>I have stepped through the code and copied the value of sUpdate into SQL Server Management Studio to ensure the correct SQL syntax. The command executes fine so I thought it was a problem with ExecScalar.
>
>Kind Regards,
>
>Mat

Try stepping all the way through to verify it makes it to the ExecuteScalar() method of SQLCommand object. You have to have the Mere Mortals debug symbols added in order to step into that code or have the framework project added to your solution.
Tim
Timothy Bryan
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform