Size of QueryDef.SQL property

  • Thread starter Patrick Jackman
  • Start date
P

Patrick Jackman

Does anyone know the maximum string size that can be accepted by the
DAO.QueryDef.SQL property?

Patrick
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Patrick Jackman
Vancouver, BC
604-874-5774
 
B

Bob Barrows

Patrick said:
Does anyone know the maximum string size that can be accepted by the
DAO.QueryDef.SQL property?

Patrick
It may be version-dependent. In Access 2002, it's "approximately 64,000"
You can find what it is for your version of Access by searching online
help for "specification"
 
P

Patrick Jackman

Thanks Bob. I'm using 2002 and roughly 64,000 appears to be the case.

Patrick said:
Does anyone know the maximum string size that can be accepted by the
DAO.QueryDef.SQL property?

Patrick
It may be version-dependent. In Access 2002, it's "approximately 64,000"
You can find what it is for your version of Access by searching online
help for "specification"
 
J

John W. Vinson

Does anyone know the maximum string size that can be accepted by the
DAO.QueryDef.SQL property?

That may not be the relevant limit. If the *COMPILED* query - compilation is
automatic before the query is executed - exceeds 64k you'll get the "Query Too
Complex" error. Microsoft has not published the compilation algorithm and I
know of no easy way to relate the compiled and uncompiled query sizes.

64k should be reasonably safe, but it's not a guarantee!
 
P

Patrick Jackman

Would this also be true of a SQL Passthrough query John?

Does anyone know the maximum string size that can be accepted by the
DAO.QueryDef.SQL property?

That may not be the relevant limit. If the *COMPILED* query - compilation is
automatic before the query is executed - exceeds 64k you'll get the "Query
Too
Complex" error. Microsoft has not published the compilation algorithm and I
know of no easy way to relate the compiled and uncompiled query sizes.

64k should be reasonably safe, but it's not a guarantee!
 
J

John W. Vinson

Would this also be true of a SQL Passthrough query John?
Ah. No, it wouldn't - that's passed on to SQL unedited, uncompiled and even
unexamined, to the best of my knowledge. I don't know if there is a size limit
or what it might be if there is one.
 
P

Patrick Jackman

Thanks John. That's actually what I'm enquiring about.

Would this also be true of a SQL Passthrough query John?
Ah. No, it wouldn't - that's passed on to SQL unedited, uncompiled and even
unexamined, to the best of my knowledge. I don't know if there is a size
limit
or what it might be if there is one.
 

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