It seems to me that the ODBC recordset is converting the action into a MYSQL query and sending it to the database, and hence the error comes up as a syntax problem. Recset.Open query, conn, adOpenDynamic, adLockOptimistic Query = "UPDATE TABLENAME SET FIELDNAME = 'SOMETHING' WHERE OTHERFIELD = 'x' Įxample (doesn't work on some compuers). If I generate a SQL query and issue it as a command, this seems to work on any computer.Įxample (always works) -Ĭmd.ActiveConnection = conn (valid working connection) The message is truncated, so I cannot see enough to really see what the error is.įrom some investigation I have found this pattern: I am aware of the problem by getting a message from the server that indicates a SQL syntax error. It is generally working nicecly, but I recently encountered an unexpected problem when the program runs on certain computers. I am using MYSQL CONNECTOR as a driver for ODBC connection to a MYSQL database. What do I need to do to make the linked server work? If I try to create the Linked Server referencing the server DSN I get the same error: I have been able to make an ODBC Server DSN connection successfully. I have also ensured I have the latest ODBC drivers (both 32 and 64 installed). I've also tried other versions of the Provider string:ĭRIVER=(MySQL ODBC 8.0 Unicode Driver) SERVER= PORT=xxxx DATABASE= USER= PASSWORD= OPTION=3 Provider String: DRIVER=(MySQL ODBC 8.0 ANSI Driver) SERVER= PORT=xxxx DATABASE= USER= PASSWORD= OPTION=3 Provider: Microsoft OLE DB Provider for ODBC Drivers I've selected/entered the following for my linked server: OLE DB provider "MSDASQL" for linked server "" returned message " Data source name not found and no default driver specified". No matter what I do, I get the following error:Ĭannot initialize the data source object of OLE DB provider "MSDASQL" for linked server "". I'm trying to create a linked server from my SSMS to a MySQL db.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |