ActiveX Data Objects, a Microsoft middleware for accessing data sources. Allows to access data from various languages without knowing how the database is implemented. Successor of RDO (Remote Data Objects) and DAO (Data Access Objects), first introduced in 1996.
Questions tagged [adodb]
1825 questions
59
votes
7 answers
How do I run a VBScript in 32-bit mode on a 64-bit machine?
I have a text file that ends with .vbs that I have written the following in:
Set Conn = CreateObject("ADODB.Connection")
Conn.Provider = "Microsoft.ACE.OLEDB.12.0"
Conn.Properties("Data Source") = "C:\dummy.accdb"
Conn.Properties("Jet OLEDB:Database…

Peter
- 1,543
- 3
- 13
- 9
47
votes
2 answers
What is difference in adodb and oledb?
What is the difference between adodb and oledb?
What is the relation between these two?
Where does ado.net stands in context of adodb and oledb?

TheVillageIdiot
- 40,053
- 20
- 133
- 188
28
votes
6 answers
Accessing SQL Database in Excel-VBA
I am copying an VBA code snippet from MSDN that shows me how to grab results from a SQL query into excel sheet (Excel 2007):
Sub GetDataFromADO()
'Declare variables'
Set objMyConn = New ADODB.Connection
Set objMyCmd = New…

Saobi
- 16,121
- 29
- 71
- 81
27
votes
6 answers
ADODBCould not load type 'ADODB.FieldsToInternalFieldsMarshaler' from assembly
I'm trying to read an ADOBD.Recordset object like this (my first time, so pardon my "noobness" :D):
Presentation.Category categorySvc = new Presentation.Category();
ADODB.Recordset categories = categorySvc.ListAll("BE", "DUE", "EN", 128);
foreach…

Wagner Danda da Silva Filho
- 4,958
- 9
- 39
- 49
20
votes
3 answers
ADODB query timeout
I am trying to open a query, which is timing out. I have tried setting the timeout property, but it doesn't seem to want to accept it.
The query takes 34 seconds to execute using MS-SQL Server Management window (SQL Server 2005), so I know I need to…

SeanC
- 15,695
- 5
- 45
- 66
16
votes
2 answers
Finding The DSN To My Database?
I have an SQL database and want to connect to it using VBA in order to support some legacy functionality. I'm using an ADODB connection and need to know what my database DSN is. How can I find this?
I'm using SQL Server 2008, thanks! :D

sooprise
- 22,657
- 67
- 188
- 276
15
votes
1 answer
Deep Copy or Clone an ADODB recordset in VBA
I have been searching for a way of duplicating or copying a recordset in VBA. And by that I mean, having the undelying data independent of each other.
I have tried
Set copyRS = origRS.Clone
Set copyRS = origRS
When I use any of the methods I cant…

Ernesto
- 605
- 1
- 13
- 30
15
votes
7 answers
VBScript & Access MDB - 800A0E7A - "Provider cannot be found. It may not be properly installed"
I've having a problem with a VBScript connecting to an access MDB Database. My platform is Vista64, but the majority of resources out there are for ASP/IIS7.
Quite simply, I can't get it to connect. I'm getting the following error:
800A0E7A -…

Perma
- 151
- 1
- 1
- 4
14
votes
13 answers
VB6 ADODB.Recordset RecordCount property always returns -1
I am trying to get some old VB6 code to work with SQL Server Compact.
I can connect, open the database and all seems well. I can run insert select commands which work.
However the ADODB.Recordset RecordCount property always returns -1 even…

Belliez
- 5,356
- 12
- 54
- 62
12
votes
4 answers
Is it necessary to close an Adodb.recordset object before setting it to nothing?
Dim rs as ADODB.Recordset
set rs = ReturnARecordset 'assume ReturnARecordset does just that...
'do something with rs
rs.Close
set rs = Nothing
Is it necessary to call rs.Close before setting it to nothing?
Edit: We have one global connection…

Brandon Moore
- 8,590
- 15
- 65
- 120
12
votes
3 answers
Running multiple async queries with ADODB - callbacks not always firing
I have an Excel workbook that fires three queries to a database to populate three tables on hidden sheets, and then runs three 'refresh' scripts to pull this data through to three visible presentation sheets (one per query). Running this…

Kai
- 2,050
- 8
- 28
- 46
11
votes
4 answers
Specify a default driver for ODBC
I have a legacy VB6 app which builds a DSN based on a parameter in a config file. The parameter is an ODBC connection, and the connection has a name (DSN-NAME) which maps a server (DBSERVER) to a driver ("SQL Server Native Client").
Generally, it…

crb
- 8,132
- 6
- 37
- 48
11
votes
4 answers
Excel VBA - connect to sql with a trusted connection (no uid/pwd)
Is there a way to have Excel connect to Sql Server using the current user's network windows authentication (trusted connection/integrated security)? I don't want to rely on a sql login or have a uid/password in my code.

notnot
- 4,472
- 12
- 46
- 57
10
votes
1 answer
VB6 application ado connection for TLS1.2
I have to support a VB6 application that is still in production (ugh). A customer is specifying our software needs to be PCI compliant which requires TLS 1.2.
Anyone know how to do this?
I am using SQL Server 2014. I'm patched to build…

FatherOfDiwaffe
- 300
- 1
- 2
- 12
10
votes
2 answers
Setting CursorType with ADODB.Command.Execute
Is there any way to set the CursorType for an ADODB.RecordSet which I obtain from ADODB.Command.Execute?
I know that it is possible if I do:
rs = Server.CreateObject("ADODB.RecordSet")
rs.Open(cmd)
However, I currently use Command.Execute with the…

Alex Gaynor
- 14,353
- 9
- 63
- 113