0
votes

I did the following

1) Created a linked server from sql server 2008 R2 to mysql

2) Got solution for select,update and delete

3) In case of insert query i got error

Query :

(without openquery)INSERT INTO Linkedservername...table name values('',);

(or)

(with openquery)insert openquery(NEWSQL,'select * from bank_list')values('aaa',11);

Returns Error Message:

OLE DB provider "MSDASQL" for linked server "NEWSQL" returned message "[MySQL][ODBC 5.1 Driver][mysqld-5.6.21]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 "NEWSQL" could not INSERT INTO table "[NEWSQL]...[bank_list]".

2

2 Answers

0
votes

Finally I Got it worked by unchecking two checked options by default in ODBC data source window

0
votes

Uncheck in ODBC settings tab page Cursors/Results these settings: "Dont't cache results of forward-only cursors" and "Force use of forward-only cursors".