How to update a record using Subsonic 3

Tags:

 

 

How to update a record using Subsonic 3 and SQL.

catalog.data.catalogDB WDB = new catalog.data.catalogDB();

string query = "UPDATE TableName SET FieldName= @Parameter WHERE FieldName = "+Value

QueryCommand q = new QueryCommand(query, WDB.DataProvider);

q.Parameters.Add("@Parameter", Value, DbType.DataBaseType);

 

WDB.DataProvider.ExecuteScalar(q);

 

Comments

No bad post, write more

No bad post, write more

Post new comment

  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <img>
  • Lines and paragraphs break automatically.

More information about formatting options

CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
Image CAPTCHA
Enter the characters shown in the image.