RunSQL maximum length

mikemaki

Registered User.
Local time
Today, 14:38
Joined
Mar 1, 2001
Messages
81
I am creating a table using a Docmd.RunSQL statement. I am building the SQL from choices off of a couple of pick lists. Needles to say the statements are much too long to display here. My problem is they are getting too long. Access 97 help states "The maximum length of the sqlstatement argument is 32,768 characters..", but my statements blow up at about 2500 characters. Does anyone know why this is and how I can get around it?
 
Yes, the string lenght is more limited when you use RunSQL.
There are various alternative methods. Generally, you would build your sql string first, than use it to open a recordset (see OpenRecordset in Access help), or with docmd.OpenQuery (see Help at OpenQuery), (eventually creating a querydef).

Alex
 

Users who are viewing this thread

Back
Top Bottom