SQL string too long?

B

Brian McBride

In Access 2000, is there a limit to the number of
characters I can use to set the SQL property of a pre-
existing querydef. I'm creating a string of just less than
3000 characters and although I don't get an error when I
apply it to the SQL property and try to run the query, it
doesn't return the correct values when I open a recordset
based on the query - even after refreshing the Querydefs
collection.
 
N

Newbie

I believe there is a limit and I think building the string like so will get
round the problem:

strSQL = "aldkjf;lakdjf;lakjsd;flakjf;lajd;fjas;dlfjaf"
strSQL = strSQL & " fdgdfgdgdgdgdgdfgfgdgdgdg"
strSQL = strSQL & " adklja;dlkjfa;lkdjfa;ldjf"

HTH
Al
 
V

Van T. Dinh

It is likely to be something else since the SQL String can be up to 64K
character. In addition, if the String is too long, 99.9% sure you get an
error, not the wrong values.
 
G

Guest

Yea, I've made some pretty monstrous strings and never maxed a limit. If it's
there, it must be big.
(e-mail address removed)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top