473,467 Members | 1,615 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Enumerating ADO Recordset Properties

Lyn
Hi,
This question may seem a bit academic...

To learn more about Access VBA, I have been enumerating the properties of
various form controls. This was mostly successful and I have learned a lot
from the process.

It occurred to me that I could also enumerate the properties of the ADO
Recordset in similar fashion, expecting to get back known properties such as
AbsolutePosition, BOF, EOF, Filter, Sort, etc. I inserted the following
into an existing piece of open recordset code:

Dim i As Integer
With RS
For i = 0 To (.Properties.Count - 1)
Debug.Print i & " " & .Properties(i).Name & ", " &
..Properties(i)
Next i
End With

This was successful to the extent that I got back a list of some 92
properties. But none of the expected properties was in the list. In fact I
have never heard of any of them, nor are they in the Access Help file. Here
is an extract of the list (the number on the left is the index):

0 Preserve on Abort, False

1 Blocking Storage Objects, True

2 Use Bookmarks, True

3 Skip Deleted Bookmarks, False

4 Bookmark Type, 1

5 Cache Deferred Columns, False

6 Fetch Backwards, True

7 Hold Rows, True

....

36 IAccessor, True

37 IColumnsInfo, True

38 IColumnsRowset, True

39 IConnectionPointContainer, True

40 IRowset, True

41 IRowsetChange, False

....

87 Jet OLEDB:Locking Granularity, 2

88 Jet OLEDB:Bulk Transactions, 0

89 Jet OLEDB:Inconsistent, True

90 Jet OLEDB:Pass Through Query Bulk-Op, False

91 Bookmarkable, True
To me this looks like I have found some sort of internal property list,
possibly between Access and the database provider (Jet in this case) -- a
list that normal developers would not access.

Can anyone confirm what this list is? Is there a way to enumerate the
"normal" ADO Recordset property list? If so, how?

A related question: Many controls (eg, TextBox, ComboBox) have the
properties .Value (default property) and .OldValue. However, these were not
returned in my enumerations. Are these properties outside the enumerated
lists? Or am I not doing this right? (I used the same code snippet above,
substituting the name of the form control under test for RS.)

Thanks in advance.

--
Cheers,
Lyn.
Nov 13 '05 #1
4 7479
DFS
Lyn wrote:
Hi,
This question may seem a bit academic...

To learn more about Access VBA, I have been enumerating the
properties of various form controls. This was mostly successful and
I have learned a lot from the process.

It occurred to me that I could also enumerate the properties of the
ADO Recordset in similar fashion, expecting to get back known
properties such as AbsolutePosition, BOF, EOF, Filter, Sort, etc. I
inserted the following into an existing piece of open recordset code:

Dim i As Integer
With RS
For i = 0 To (.Properties.Count - 1)
Debug.Print i & " " & .Properties(i).Name & ", " &
.Properties(i)
Next i
End With

This was successful to the extent that I got back a list of some 92
properties. But none of the expected properties was in the list. In
fact I have never heard of any of them, nor are they in the Access
Help file. Here is an extract of the list (the number on the left is
the index):

0 Preserve on Abort, False

1 Blocking Storage Objects, True

2 Use Bookmarks, True

3 Skip Deleted Bookmarks, False

4 Bookmark Type, 1

5 Cache Deferred Columns, False

6 Fetch Backwards, True

7 Hold Rows, True

...

36 IAccessor, True

37 IColumnsInfo, True

38 IColumnsRowset, True

39 IConnectionPointContainer, True

40 IRowset, True

41 IRowsetChange, False

...

87 Jet OLEDB:Locking Granularity, 2

88 Jet OLEDB:Bulk Transactions, 0

89 Jet OLEDB:Inconsistent, True

90 Jet OLEDB:Pass Through Query Bulk-Op, False

91 Bookmarkable, True
To me this looks like I have found some sort of internal property
list, possibly between Access and the database provider (Jet in this
case) -- a list that normal developers would not access.

Can anyone confirm what this list is? Is there a way to enumerate the
"normal" ADO Recordset property list? If so, how?

A related question: Many controls (eg, TextBox, ComboBox) have the
properties .Value (default property) and .OldValue. However, these
were not returned in my enumerations. Are these properties outside
the enumerated lists? Or am I not doing this right? (I used the
same code snippet above, substituting the name of the form control
under test for RS.)

Thanks in advance.


Do you have SQL Server installed on your machine? Those are properties the
OLE DB Provider for SQL Server adds to some ADO objects.

http://msdn.microsoft.com/library/de...prg04_1ub7.asp

Will you do me a favor and check your References, and tell me which one, if
any, has OLE DB in it, and the path to the file

Thanks

Nov 13 '05 #2
Lyn

"DFS" <no****@DFS.com> wrote in message news:f_*****************@fe07.lga...

Do you have SQL Server installed on your machine? Those are properties
the
OLE DB Provider for SQL Server adds to some ADO objects.

http://msdn.microsoft.com/library/de...prg04_1ub7.asp

Will you do me a favor and check your References, and tell me which one,
if
any, has OLE DB in it, and the path to the file

Thanks


DFS,
Thanks for your response.

I don't have SQL Server installed. None of the listed OLE DB References is
checked as Available. The References I have are as they came installed in
Office (except MouseWheel which I added). These are:

Visual Basic for Applications
Microsoft Access 11.0 Object Library
OLE Automation
Microsoft DAO 3.6 Object Library
Microsoft ActiveX Data Objects 2.1 Library
Microsoft Forms 2.0 Object Library
MouseWheel

Looking at the list, I note that there are several later versions of
Microsoft ActiveX Data Objects Library (up to 2.8) which are unchecked.
Should I have the latest version checked instead of (or as well as) version
2.1?

There are three (unchecked) References which include "OLE DB". These are:

Microsoft OLE DB provider for OLAP Services connection dialog 8.0
C:\Program Files\Common Files\SYSTEM\OLE DB\MSOLUI80.DLL
Microsoft OLE DB Service Component 1.0 Type Library
C:\Program Files\Common Files\System\Ole DB\oledb32.dll
OLE DB Errors Type Library
C:\Program Files\Common Files\System\Ole DB\oledb32.dll

Is this all OK?

--
Cheers,
Lyn.
Nov 13 '05 #3
DFS
Lyn wrote:
"DFS" <no****@DFS.com> wrote in message
news:f_*****************@fe07.lga...

Do you have SQL Server installed on your machine? Those are
properties the
OLE DB Provider for SQL Server adds to some ADO objects.

http://msdn.microsoft.com/library/de...prg04_1ub7.asp
Will you do me a favor and check your References, and tell me which
one, if
any, has OLE DB in it, and the path to the file

Thanks
DFS,
Thanks for your response.

I don't have SQL Server installed. None of the listed OLE DB
References is checked as Available. The References I have are as
they came installed in Office (except MouseWheel which I added).
These are:

Visual Basic for Applications
Microsoft Access 11.0 Object Library
OLE Automation
Microsoft DAO 3.6 Object Library
Microsoft ActiveX Data Objects 2.1 Library
Microsoft Forms 2.0 Object Library
MouseWheel

Looking at the list, I note that there are several later versions of
Microsoft ActiveX Data Objects Library (up to 2.8) which are
unchecked. Should I have the latest version checked instead of (or as
well as) version
2.1?


I rarely use ADO, so I can't say, but I would imagine 2.8 has some goodies
not found in 2.1. If you're going to be developing and distributing client
systems in Access, you might need to be careful about which library
references you choose. There's a current cdma thread on just this subject,
matter of fact.

Those are the MS data access components MDAC
http://www.microsoft.com/downloads/d...DisplayLang=en

FYI, all those ActiveX library references point to C:\Program Files\Common
Files\System\ado.
There are three (unchecked) References which include "OLE DB". These
are:

Microsoft OLE DB provider for OLAP Services connection dialog 8.0
C:\Program Files\Common Files\SYSTEM\OLE DB\MSOLUI80.DLL
Microsoft OLE DB Service Component 1.0 Type Library
C:\Program Files\Common Files\System\Ole DB\oledb32.dll
OLE DB Errors Type Library
C:\Program Files\Common Files\System\Ole DB\oledb32.dll

Is this all OK?


Yes. You don't have anything to worry about.

I was trying to find out how you got those OLE DB properties available. I
found the .dll file C:\Program Files\Common Files\System\Ole
DB\sqloledb.dll, but couldn't add a reference to it in my VBA project. And
I have SQL Server installed. But I built my system, and as a rule I choose
custom installs and choose the minimum I need, so I most likely never
installed the OLE DB provider. I may go back and do that, 'cause some of
those properties you listed look handy.

Probably whoever installed your Office system just chose everything.

Thanks for the comprehensive response.

Nov 13 '05 #4
VB/VBA does not have any direct support for a Properties collection of a
generic object that contains the accessible properties of the object. Objects
that do have a Properties collection implement it themselves.

Often, a class will include in its properties collection, both some of the
items that are also available as "." properties of the class, and also some
properties that are determined at run-time. In the case of an ADO recordset,
the Properties collection may include properties that the specific ADO
provider makes available, but that the ADO library has no direct knowledge of.
These are mostly not undocumented, but documented for the provider, not for
ADO.

To see the standard properties (not Properties collection members) of an
object, simply go the the object browser by pressing F2. Some items are
normally hidden, so if you want to see those items as well, right-click in the
object browser, and select Show Hidden Members.

On Sat, 26 Feb 2005 15:20:54 +1100, "Lyn" <lh******@ihug.com.au> wrote:
Hi,
This question may seem a bit academic...

To learn more about Access VBA, I have been enumerating the properties of
various form controls. This was mostly successful and I have learned a lot
from the process.

It occurred to me that I could also enumerate the properties of the ADO
Recordset in similar fashion, expecting to get back known properties such as
AbsolutePosition, BOF, EOF, Filter, Sort, etc. I inserted the following
into an existing piece of open recordset code:

Dim i As Integer
With RS
For i = 0 To (.Properties.Count - 1)
Debug.Print i & " " & .Properties(i).Name & ", " &
.Properties(i)
Next i
End With

This was successful to the extent that I got back a list of some 92
properties. But none of the expected properties was in the list. In fact I
have never heard of any of them, nor are they in the Access Help file. Here
is an extract of the list (the number on the left is the index):

0 Preserve on Abort, False

1 Blocking Storage Objects, True

2 Use Bookmarks, True

3 Skip Deleted Bookmarks, False

4 Bookmark Type, 1

5 Cache Deferred Columns, False

6 Fetch Backwards, True

7 Hold Rows, True

...

36 IAccessor, True

37 IColumnsInfo, True

38 IColumnsRowset, True

39 IConnectionPointContainer, True

40 IRowset, True

41 IRowsetChange, False

...

87 Jet OLEDB:Locking Granularity, 2

88 Jet OLEDB:Bulk Transactions, 0

89 Jet OLEDB:Inconsistent, True

90 Jet OLEDB:Pass Through Query Bulk-Op, False

91 Bookmarkable, True
To me this looks like I have found some sort of internal property list,
possibly between Access and the database provider (Jet in this case) -- a
list that normal developers would not access.

Can anyone confirm what this list is? Is there a way to enumerate the
"normal" ADO Recordset property list? If so, how?

A related question: Many controls (eg, TextBox, ComboBox) have the
properties .Value (default property) and .OldValue. However, these were not
returned in my enumerations. Are these properties outside the enumerated
lists? Or am I not doing this right? (I used the same code snippet above,
substituting the name of the form control under test for RS.)

Thanks in advance.


Nov 13 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Tom | last post by:
I want to open a recordset object on an .asp page. When I open the recordset I would like to use a stored procedure that expects a parameter to be passed for the stored procedure. I will then use...
25
by: Lyn | last post by:
Hi, I am working on a genealogy form. The only table (so far) lists everybody in the family, one record per person. Each record has an autonum ID. The parent form (frmMainForm) displays the...
0
by: sienayr | last post by:
Greetings, I have searched hi and lo through the groups and haven't found my problem specifically. I have listed below what I have tried based on what I have found in the groups. Please let me...
4
by: Brett Mostert | last post by:
Hi, I need to be able to Enumerate through Printer Drivers, ports, printers and so fourth. And even add printers, ports, and drivers and setup printers. Sofar i can do all of the following...
0
by: wifetalks | last post by:
I'm enumerating the computers in the domain to a listview control on my form, but how do I include the comments. Like what you would see in Windows Explorer when you browse the domain. On our...
0
by: AdamKadmon | last post by:
Hello Group, Below is (mostly)functional code that enumerates certain properties for all of the groups in my Active Directory. My question is contained within comments as well as here: Once I...
7
by: marmottedodue | last post by:
Hello, I'm trying to debug an access project in which two kind of recordset are used: ADODB.recordset and DAO.recordset. I'm trying to set the whole project on DAO.recordset, but the following...
0
by: John | last post by:
Hello, i write this code (vs2005) for enumerating all users from a group.. But not it works.. if i set GroupSamAccountName = "Domain Users" i don't have any results.. Why?
0
by: JDMils | last post by:
I am having trouble finding the AutoNumber field of my database with this code. The code is used to replicate a specific table, reproducing all columns including indexes and Primary Keys (there is...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.