A
Ashim Akbari
I start ASP.net
i have sample of Sams book
it's Update SQL. but i got this ERR
Operation must use an updateable query
ERR In Line 42: nRowsAffected = cmd.ExecuteNonQuery(); !!!!!!!!!!!
Exception Details: System.Data.OleDb.OleDbException: Operation must use an
updateable query.
i tried my computer and in my Host !!!!!!!!
it's very simple Source:
-----------------------------------------------------------
OleDbConnection con = new
OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;" + "Data
Source=C:\\Program Files\\Microsoft Office\\" +
"Office\\Samples\\Northwind.mdb;" + "User ID=;Password=;");
con.Open();
OleDbCommand cmd = new OleDbCommand("Update Products Set UnitPrice = " +
Price.Text + " where ProductName = '" + Name.Text + "'", con);
int nRowsAffected = 0;
nRowsAffected = cmd.ExecuteNonQuery();
con.Close();
i have sample of Sams book
it's Update SQL. but i got this ERR
Operation must use an updateable query
ERR In Line 42: nRowsAffected = cmd.ExecuteNonQuery(); !!!!!!!!!!!
Exception Details: System.Data.OleDb.OleDbException: Operation must use an
updateable query.
i tried my computer and in my Host !!!!!!!!
it's very simple Source:
-----------------------------------------------------------
OleDbConnection con = new
OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;" + "Data
Source=C:\\Program Files\\Microsoft Office\\" +
"Office\\Samples\\Northwind.mdb;" + "User ID=;Password=;");
con.Open();
OleDbCommand cmd = new OleDbCommand("Update Products Set UnitPrice = " +
Price.Text + " where ProductName = '" + Name.Text + "'", con);
int nRowsAffected = 0;
nRowsAffected = cmd.ExecuteNonQuery();
con.Close();