Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Switching from MS Access to MySQL

Status
Not open for further replies.

bomayed

Technical User
May 13, 2002
101
AE
I have an ASP script that inserts some information to MS Access file. But now I want to switch to MySQL database and when I try to run the same script it gives me an error message.

For example if I run this statement

cnn.Execute ("DELETE * from the_database")

I get this error message:


Microsoft OLE DB Provider for ODBC Drivers (0x80040E14)
[MySQL][ODBC 3.51 Driver][mysqld-4.0.14-max-debug]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 '* from the_database' at line 1

can someone help me understand what is wrong?

Thank you
 
It's not a well-formed MySQL query.

If you are trying to delete every record in a table, then the query should read, "DELETE FROM tablename". (
If you are attempting to delete a table from a database, then the query is "DROP TABLE tablename". (
Want the best answers? Ask the best questions: TANSTAAFL!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top