ODBC query length within VBA code

poiu

Active Member
Joined
Sep 13, 2011
Messages
384
Hello,

I've recorded a macro that creates an ODBC connection.

Howevery the recorded macro does not have a full SQL query (I assume because I am using too many columns). If I replace the problem part of the query with just "*" then the whole table is imported correctly.

Please could you tell me if this is a known issue in Excel 2003? (is there a limit on the length of an SQL string?).

Thanks,

Poiu
 

Excel Facts

How can you turn a range sideways?
Copy the range. Select a blank cell. Right-click, Paste Special, then choose Transpose.
I know in the past I've executed very long SQL strings via ADO/ODBC connections so I don't *think* there is a (practical) limit. i suspect it is more to do with the way the macro recorder records the steps taken in creating the ODBC query.
 
Upvote 0

Forum statistics

Threads
1,214,527
Messages
6,120,057
Members
448,940
Latest member
mdusw

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top