Friday 15 May 2015

C# sql if query -


I try to

  var sql = string.format ("if ( {0} & gt; (Select from yCell to sStrength, where cell_ID = '{1}')) ycell SET sStrength = {0} WHERE cell_id = '{1}' end ", Maxstrength, update to InSalead); SqlCeCommand myCommand = New SqlCeCommand (SQL, Connection); MyCommand.ExecuteNonQuery ();   

There is an error: Token Line Number = 1, Token Line offset = 1, error in error = if but it runs fine in SQL Studio.

Can not say why it is unsuccessful, but I can suggest that you might have a command Try updating in:

Update YCell SET sStrength {=} WHERE cell_id = '{1}' and {0}> Estrinth

No comments:

Post a Comment