Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2008 Forums
 SQL Server Administration (2008)
 issue with INSERT into linked server

Author  Topic 

janosh
Starting Member

2 Posts

Posted - 2015-03-31 : 06:39:44
Hi,
I would like to push some data from my SQL Server to a linked MySQL server database. For that reason I have setup the MySQL database as a LinkedServer" on the SQL Server. SELECT statements work well, but INSERT statement return the follwing error messages:

INSERT INTO extranet...tbl_testing (alpha,beta) VALUES ('test','test');

OLE DB provider "MSDASQL" for linked server "extranet" returned message "[MySQL][ODBC 5.3(w) Driver][mysqld-5.1.56-log]Commands out of sync; you can't run this command now".
Msg 7343, Level 16, State 2, Line 1
The OLE DB provider "MSDASQL" for linked server "extranet" could not INSERT INTO table "[extranet]...[tbl_testing]".


Any idea or help?

Environment:
- Win 2008 R2 Std 64bit
- SQL Server 2008 R2 SP3
- Query executed in MS SQL Server Management Studio 2008 R2
- MySQL 5.1.56, using ODBC Driver 5.3 Unicode
- Provider MSDASQL with checked options NestedQueries,inprocess,LevelZero, Like support

kind regards,
janosh

janosh
Starting Member

2 Posts

Posted - 2015-04-01 : 01:26:31
The trick was to uncheck the ODBC option "Force Forward Only Cursor". This solved the problem.

See [url]http://eedle.com/2012/05/01/sql-server-mqsql-commands-out-of-sync-you-cant-run-this-command-now/[/url]
Go to Top of Page
   

- Advertisement -