- Microsoft ActiveX Data Objects 2.7 Library - Microsoft ActiveX Data Objects 2.8 Library Currently I have referenced 2.1 and am using a disconnected recordset (no database) which is saved into a file using adPersistADTG, then subsequently Opened in another session. I note that Windows 2000, XP and so on have a version of MDAC.
- Microsoft Data Access Components (MDAC) 2.8 SP1 contains core Data Access components such as the Microsoft SQL Serverâ„¢ OLE DB provider and ODBC driver. This redistributable installer for the MDAC 2.8 SP1 release installs the same Data Access components as Microsoft Windows XP SP2.
- CVE-2019-0888: Use-After-Free in Windows ActiveX Data Objects (ADO). The article references symbols and types from the 32-bit vbscript.dll file, version 5.812.4, from Windows 10. ADO is an API to access and manipulate data through an OLE database provider. In our examples to follow, the OLE DB provider is a Microsoft.
Active3 years, 8 months ago
Download hindi music torrent free. I always added references into my .bas module through 'Tools..->References..'. And now I want to add references automatically, using macro code. I need to add the two references:
Microsoft ActiveX Data Objects 6.1 Library
and Microsoft VBScript Regular Expressions 5.5
. And I found a piece of code that seems to do what I want:But I don't know how to get paths of files (
PATH_TO_FILE
). Maybe somebody can help me? Thanks in advance.Community♦
KseniaKsenia1,09022 gold badges1515 silver badges3333 bronze badges
Microsoft Activex Data Objects Library Versions
1 Answer
You can find the file path on the References VBAProject dialog (Tools >> References). Look for the location property.
EDIT: As pointed out in the comments, you cannot always read the full name. This sub outputs all the current references.
Warning
You should really read @MacroMan's comment on the OP. Although you can update references programmatically, you probably shouldn't.
![Data Data](/uploads/1/2/5/0/125072597/275661452.jpg)
4,39111 gold badge1313 silver badges2929 bronze badges
Not the answer you're looking for? Browse other questions tagged vbaexcel-vbaexcel or ask your own question.
Hello,
I use the Microsoft ActiveX Data Objects Library to connect to our SQL server to run queries against tables and return the desired results for reporting.
Issue I am running into is this. I primarily use the 2.8 Library, but need to create a 2.7 Library version of the xlsm since some users will get an error message on the 2.8 Library version of the xlsm. On the PCs that have issues, I have run the MDAC_Type.exe for the 2.8 update and that has NOT corrected the problem and on some PCs, it will not run (Not compatible). Our environment is XP Pro and WIn 7 Pro, and I will get errors on both OS for both Libraries.
It is very frustrating to maintain 2 versions of a xlsm just to ensure that all of the users can use one or the other to avoid an error message.
This is the basic code I use to setup my connection and run my query. The error always occurs at the dbConn.Open myConn line in the code.
'ADD ADO Reference
myServer = 'SERVERXX'
myDB = 'XXXX'
myDB = 'XXXX'
Set dbConn = New ADODB.Connection
myConn = 'PROVIDER=SQLOLEDB;Integrated Security=SSPI;Persist Security Info=False;'
myConn = myConn & 'DATA SOURCE=' & myServer & ';INITIAL CATALOG=' & myDB & ';'
dbConn.Open myConn
myQuery = 'select * from Table'
Set myRS = New ADODB.Recordset
With myRS
.ActiveConnection = dbConn
.Open myQuery
End With
Do Until myRS.EOF
userID = myRS.Fields(0).Value
myRS.MoveNext
Loop
myRS.Close
dbConn.Close
myConn = 'PROVIDER=SQLOLEDB;Integrated Security=SSPI;Persist Security Info=False;'
myConn = myConn & 'DATA SOURCE=' & myServer & ';INITIAL CATALOG=' & myDB & ';'
dbConn.Open myConn
myQuery = 'select * from Table'
Set myRS = New ADODB.Recordset
With myRS
.ActiveConnection = dbConn
.Open myQuery
End With
Do Until myRS.EOF
userID = myRS.Fields(0).Value
myRS.MoveNext
Loop
myRS.Close
dbConn.Close
The ADO Reference that I use will be either the Microsoft ActiveX Data Object 2.8 Library or the Microsoft ActiveX Data Object 2.7 Library and append the file names with either (2.8).xlsm or (2.7).xlsm to distinguish between the two.
Any help in getting this issue resolved will be GREATLY appreciated. I would like to use the 2.8 library all the time and need to know what needs to be done on the PCs that get an error with that library.
The error message for those that get the error:
Title: Microsoft Visual Basic for Applications
Message: Class does not support Automation or does not support expected interface.
AGAIN, I have run the latest MDAC update on those PCs that get the error and it either has not worked, or will error out with a message stating it is not supported.
Please help me.. THANKS!!
PS - I am sorry if I missed including any vital information. I did my best to include all relevant facts.