Dec 14, 2008 #1 CharlesFS Technical User Dec 14, 2008 39 BR Hy, i need a vba code to insert all data from access table into mysql table. I tryed "DoCmd.TransferDatabase acExport" but this send the table object to mysql. Help please.
Hy, i need a vba code to insert all data from access table into mysql table. I tryed "DoCmd.TransferDatabase acExport" but this send the table object to mysql. Help please.
Dec 14, 2008 1 #2 Remou Technical User Sep 30, 2002 13,030 BE You can link to the MySQL table with ODBC or ADO and update, or simply update through ADO. You will find connection strings here: http://www.connectionstrings.com/mysql Upvote 0 Downvote
You can link to the MySQL table with ODBC or ADO and update, or simply update through ADO. You will find connection strings here: http://www.connectionstrings.com/mysql
Dec 14, 2008 1 Thread starter #3 CharlesFS Technical User Dec 14, 2008 39 BR Remou can you post sample code? Please. Thanks! Upvote 0 Downvote
Dec 14, 2008 Thread starter #4 CharlesFS Technical User Dec 14, 2008 39 BR SOLVED!!!!!!!!!!!! My soluction to insert access table data into mysql table-> '****************************************** Sub INSERT() DoCmd.SetWarnings False strSql = "insert INTO [ODBC;DSN=Database;DATABASE=Base;_ Trusted_Connection=Yes;].TblDestiny select * FROM TblSource;" DoCmd.RunSQL strSql DoCmd.SetWarnings True End Sub '****************************************** Thanks Remou! Upvote 0 Downvote
SOLVED!!!!!!!!!!!! My soluction to insert access table data into mysql table-> '****************************************** Sub INSERT() DoCmd.SetWarnings False strSql = "insert INTO [ODBC;DSN=Database;DATABASE=Base;_ Trusted_Connection=Yes;].TblDestiny select * FROM TblSource;" DoCmd.RunSQL strSql DoCmd.SetWarnings True End Sub '****************************************** Thanks Remou!