0

hello all
i have problem :

string sssql = "SELECT *FROM BooksCatalog WHERE BookID = '" + TB[2].Text + "'";
 ds =DBC.Read(sssql); // class that read from sql
                    foreach (DataRow row in ds.Tables[0].Rows)
                    {
                        row["BorrowState"] = "good"; // that not write that in my database here its the problem
                    }

please help me
thankss

5
Contributors
7
Replies
8
Views
6 Years
Discussion Span
Last Post by __avd
0

instead of:
string sssql = "SELECT *FROM
use:
string sssql = "SELECT * FROM
there must be a space after the (*) sign

0

mmaenb, you are wrong sir. I have just tested in SQL Server Management Studio and you can do Select *From TableName and it runs fine. It is proper to have a space after for readability, however it is not mandatory.

0

You need to use UPDATE statement to update rows.

sql="update BooksCatalog set BorrorState='good' WHERE BookID = '" + TB[2].Text + "'";
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.