QueryDef DOL property

  • Thread starter Sergey Poberezovskiy
  • Start date
B

Brendan Reynolds

On my system, a QueryDef doesn't have a DOL property. But perhaps we are
using different language versions of Access. Could this be the property I
know as the SQL property? If it is, it reads/sets the SQL statement that
defines the query.

--
Brendan Reynolds (MVP)
http://brenreyn.blogspot.com

The spammers and script-kiddies have succeeded in making it impossible for
me to use a real e-mail address in public newsgroups. E-mail replies to
this post will be deleted without being read. Any e-mail claiming to be
from brenreyn at indigo dot ie that is not digitally signed by me with a
GlobalSign digital certificate is a forgery and should be deleted without
being read. Follow-up questions should in general be posted to the
newsgroup, but if you have a good reason to send me e-mail, you'll find
a useable e-mail address at the URL above.
 
S

Sergey Poberezovskiy

Brendan,

If you enumerate an existing QeuryDef Properties (in
code), as follows:
For Each prp in qdf.Properties
Debug.Pring prp.Name
Next
you will see that most select queries will have the
property.

Any thoughts?
 
B

Brendan Reynolds

Not on my system, Sergey ...

Public Sub QueriesWithDOL()

Dim qdf As DAO.QueryDef
Dim prp As DAO.Property
Dim lngCount As Long

Debug.Print "Number of queries: " & CurrentDb.QueryDefs.Count
For Each qdf In CurrentDb.QueryDefs
For Each prp In qdf.Properties
If prp.Name = "DOL" Then
lngCount = lngCount + 1
End If
Next prp
Next qdf
Debug.Print "Number of queries with DOL property: " & lngCount

End Sub

In the Immediate window ...

querieswithdol
Number of queries: 436
Number of queries with DOL property: 0

--
Brendan Reynolds (MVP)
http://brenreyn.blogspot.com

The spammers and script-kiddies have succeeded in making it impossible for
me to use a real e-mail address in public newsgroups. E-mail replies to
this post will be deleted without being read. Any e-mail claiming to be
from brenreyn at indigo dot ie that is not digitally signed by me with a
GlobalSign digital certificate is a forgery and should be deleted without
being read. Follow-up questions should in general be posted to the
newsgroup, but if you have a good reason to send me e-mail, you'll find
a useable e-mail address at the URL above.
 
T

Tom Wickerath

Very strange. On my system, using a copy of Northwind that serves as a scratchpad of sorts, I
get the following results in the immediate window:

querieswithdol
Number of queries: 126
Number of queries with DOL property: 61

There are only 65 queries visible in the database window with show hidden objects option checked.
Also, Total Access Analyzer lists 65 queries. It appears as if several of the queries are
temporary queries (present even after doing a compact and repair). I added three debug.print
statements to Brendan's procedure:

If prp.Name = "DOL" Then
lngCount = lngCount + 1
Debug.Print qdf.Name
Debug.Print prp.Value
Debug.print
Else

When I rerun the procedure, I get results that look like this (Note: prp.value includes several
square boxes for some of the queries, which represent unprintable characters. I'm not sure how
these will appear after I post this message):

~sq_cCustomer Orders~sq_cCustomer Orders Subform2
?? ???????? ???????Products ???????? ???????Order Details ???????? ????????OrderID
???????? ????????ProductID ???????? ????????ProductName ???????? ????????UnitPrice
???????? ????????Quantity ???????? ????????Discount ???????? ????????ProductID

~sq_cfrmCustomerOrders~sq_cCustomer Orders Subform2
?? ???????? ???????Products ???????? ???????Order Details ???????? ????????OrderID
???????? ????????ProductID ???????? ????????ProductName ???????? ????????UnitPrice
???????? ????????Quantity ???????? ????????Discount ???????? ????????ProductID

Category Sales for 1997
??

Current Product List
?? ???????? ?????H?bProducts

Customers and Suppliers by City
??


Tom
____________________________________

"Brendan Reynolds" <brenreyn at indigo dot ie> wrote in message

Not on my system, Sergey ...

Public Sub QueriesWithDOL()

Dim qdf As DAO.QueryDef
Dim prp As DAO.Property
Dim lngCount As Long

Debug.Print "Number of queries: " & CurrentDb.QueryDefs.Count
For Each qdf In CurrentDb.QueryDefs
For Each prp In qdf.Properties
If prp.Name = "DOL" Then
lngCount = lngCount + 1
End If
Next prp
Next qdf
Debug.Print "Number of queries with DOL property: " & lngCount

End Sub

In the Immediate window ...

querieswithdol
Number of queries: 436
Number of queries with DOL property: 0

--
Brendan Reynolds (MVP)
http://brenreyn.blogspot.com

The spammers and script-kiddies have succeeded in making it impossible for
me to use a real e-mail address in public newsgroups. E-mail replies to
this post will be deleted without being read. Any e-mail claiming to be
from brenreyn at indigo dot ie that is not digitally signed by me with a
GlobalSign digital certificate is a forgery and should be deleted without
being read. Follow-up questions should in general be posted to the
newsgroup, but if you have a good reason to send me e-mail, you'll find
a useable e-mail address at the URL above.
 
B

Brendan Reynolds

I tried a search of MSDN and the KB, and got no results. Whatever it is, it
appears to be undocumented.

--
Brendan Reynolds (MVP)
http://brenreyn.blogspot.com

The spammers and script-kiddies have succeeded in making it impossible for
me to use a real e-mail address in public newsgroups. E-mail replies to
this post will be deleted without being read. Any e-mail claiming to be
from brenreyn at indigo dot ie that is not digitally signed by me with a
GlobalSign digital certificate is a forgery and should be deleted without
being read. Follow-up questions should in general be posted to the
newsgroup, but if you have a good reason to send me e-mail, you'll find
a useable e-mail address at the URL above.
 
A

Andi Mayer

I was currious what that is and made a new query in my test db (had
none) Access2000

and I have a DOL

Number of queries: 1
Query1
?? ???????? ??????myEmptyFields
Number of queries with DOL property: 1

SELECT * FROM myEmptyFields

Query1
?? ???????? ?????!?myEmptyFields ???????? ????????tName
???????? ????????fName ???????? ????????ID
Number of queries with DOL property: 1

SELECT myEmptyFields.tName, myEmptyFields.fName, myEmptyFields.ID
FROM myEmptyFields;

Besides that I have no glue
 
6

'69 Camaro

Those using Access 2003 have a clue when looking at the DOL property value:

"This name map was created in Access V11 or higher"

The DOL and GUID properties provide the information that Name AutoCorrect
and Object Dependencies features (for Access 2003 only) need to track the
individual name mappings.

The Northwind database had these features turned on when it was created.
People who don't see the DOL property in their database objects have wisely
turned off the default settings for Name AutoCorrect.

HTH.

Gunny

See http://www.QBuilt.com for all your database needs.
See http://www.Access.QBuilt.com for Microsoft Access tips.

(Please remove ZERO_SPAM from my reply E-mail address, so that a message
will be forwarded to me.)
 
A

Andi Mayer

On Wed, 12 Jan 2005 10:53:01 -0800, "'69 Camaro"

Thanks for the inside, now I know why I have it 2000 and not in 2002
(the db in 2000 is only a test, the 2002 is nearly finished one)
 
6

'69 Camaro

You're welcome. For most of us, this is just a trivia question, since this
is not a property one wants to fiddle with.

HTH.

Gunny

See http://www.QBuilt.com for all your database needs.
See http://www.Access.QBuilt.com for Microsoft Access tips.

(Please remove ZERO_SPAM from my reply E-mail address, so that a message
will be forwarded to me.)
 
B

Brendan Reynolds

Yeah, but I'm gonna like awake tonight now, wondering what the heck 'DOL'
stands for ... ! :-(

--
Brendan Reynolds (MVP)
http://brenreyn.blogspot.com

The spammers and script-kiddies have succeeded in making it impossible for
me to use a real e-mail address in public newsgroups. E-mail replies to
this post will be deleted without being read. Any e-mail claiming to be
from brenreyn at indigo dot ie that is not digitally signed by me with a
GlobalSign digital certificate is a forgery and should be deleted without
being read. Follow-up questions should in general be posted to the
newsgroup, but if you have a good reason to send me e-mail, you'll find
a useable e-mail address at the URL above.


'69 Camaro said:
You're welcome. For most of us, this is just a trivia question, since
this
is not a property one wants to fiddle with.

HTH.

Gunny

See http://www.QBuilt.com for all your database needs.
See http://www.Access.QBuilt.com for Microsoft Access tips.

(Please remove ZERO_SPAM from my reply E-mail address, so that a message
will be forwarded to me.)
 
Top