SQL Server mqSQL “Commands out of sync; you can’t run this command now”

Scenario is:

1. You have a SQL Server db

2. You have a mySQL db

3. The SQL server db has a Linked Server connection to mySQL and you are using the mySQL Connector/OBDC

4. You try an insert or update statement in SQL server against the mySQL db using OPENQUERY

5. You receive the error "Commands out of sync; you can't run this command now"

To solve, uncheck the Forward Only Cursor option in the OBDC options.

2012-05-01_16-15-01

2 thoughts on “SQL Server mqSQL “Commands out of sync; you can’t run this command now”

  1. Whoa. I’ve been working with other technologies for quite a while and it was with a jolt that my eyes popped open seeing the acronym ODBC. It seems ODBC is still going strong, eh?

  2. Pingback: I need to write more blog posts about SQL server and missing toolbars in Excel | David Eedle

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s