Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
CommandTimeout with ExecScalar
Message
De
05/01/2009 20:15:01
Timothy Bryan
Sharpline Consultants
Conroe, Texas, États-Unis
 
Information générale
Forum:
ASP.NET
Catégorie:
The Mere Mortals .NET Framework
Versions des environnements
Environment:
C# 2.0
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
MS SQL Server
Divers
Thread ID:
01371141
Message ID:
01371261
Vues:
13
>>
>>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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform