MySQL insert records using MS Access
am 17.07.2006 17:42:53 von davidgordonHi,
I have a MySQL database linked to an MS Access front-end.
I have an app which works fine with the local copy of the Access DB,
but when run with the linked tables for MySQL, it fails.
I'm trying to copy over related data for products, which is held in
seperate tables.
The main copying of the producy works fine, just not any related
product data.
The part code I have is:
--------------------------------
MySql1 = "INSERT INTO Related (product_ID, product_Ref, prod_relate) "
MySql1 = MySql1 & "SELECT " & NewProductID & " ,
Related.product_Ref, Related.prod_relate FROM Related "
MySql1 = MySql1 & "WHERE Related.product_ID = " & currentid
db.Execute MySql1, dbFailOnError
------------------------------
At present it hits the last line and fails ....... what am I doing
wrong ?
I import link the tables via ODBC.
The problem must lie in the SQL syntax ???? for MySQL
Thanks