Cannot do delete with SqlDataSource
Posted: Tue 25 Apr 2006 07:52
I'm now using MySQL 5.0.20a
I can do a select and update from SqlDataSource
I cannot do a delete through SqlDataSource using MySQLDirect .NET version 3.50.
Following is the code and the error I got.
What's the problem I have? Did I do anything wrongly?
Here's is my code:
"
DeleteCommand="DELETE FROM customers WHERE CUST_ID = ?"
ProviderName="" SelectCommand="SELECT * FROM customers"
UpdateCommand="UPDATE customers SET CUST_FIRSTNAME = ?, CUST_LASTNAME = ?, CUST_LAST_UPDATE_DATE = ?, CUST_ADDRESS = ? WHERE CUST_ID = ?" InsertCommand="INSERT INTO customers (CUST_FIRSTNAME, CUST_LASTNAME, CUST_LAST_UPDATE_DATE, CUST_ADDRESS) VALUES (?, ?, ?, ?)">
Here's the error:
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '?' at line 1
I can do a select and update from SqlDataSource
I cannot do a delete through SqlDataSource using MySQLDirect .NET version 3.50.
Following is the code and the error I got.
What's the problem I have? Did I do anything wrongly?
Here's is my code:
"
DeleteCommand="DELETE FROM customers WHERE CUST_ID = ?"
ProviderName="" SelectCommand="SELECT * FROM customers"
UpdateCommand="UPDATE customers SET CUST_FIRSTNAME = ?, CUST_LASTNAME = ?, CUST_LAST_UPDATE_DATE = ?, CUST_ADDRESS = ? WHERE CUST_ID = ?" InsertCommand="INSERT INTO customers (CUST_FIRSTNAME, CUST_LASTNAME, CUST_LAST_UPDATE_DATE, CUST_ADDRESS) VALUES (?, ?, ?, ?)">
Here's the error:
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '?' at line 1