Size of QueryDef.SQL property

  • Thread starter Thread starter Patrick Jackman
  • Start date 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
 
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"
 
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"
 
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!
 
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!
 
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.
 
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.
 
Back
Top