Page 1 of 1

Cannot do delete with SqlDataSource

Posted: Tue 25 Apr 2006 07:52
by ballball2k
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

Posted: Tue 25 Apr 2006 09:24
by Alexey
There is no errors in this code. At least it works fine here.
Send us small test project if possible to reproduce the problem; it is
desirable to use 'test' schema objects, otherwise include definition of
your own database objects. Do not use third party components.

Posted: Tue 25 Apr 2006 10:02
by ballball2k
Where should I send the project to?

Posted: Tue 25 Apr 2006 10:16
by Alexey
Please use e-mail address provided in the registration letter or in readme.txt file.

Posted: Tue 25 Apr 2006 10:30
by ballball2k
Email sent.

Posted: Wed 26 Apr 2006 07:47
by Alexey
We reproduced the problem and now investigating it. You will be notified on results as soon as possible.

Posted: Wed 03 May 2006 12:01
by Alexey
Try to add

Code: Select all

DataKeyNames="CUST_ID"  
to the definition of GridView component:

Code: Select all

 

Posted: Tue 22 Aug 2006 09:32
by Alexey
Do you have appropriate record about MySQLDirect data provider in section of machine.config file?
What version of MySQLDirect do you use?