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
10
votes
6 answers
'Type Mismatch' Error on ADODB.Recordset
I have a program that is supposed to read data from an SQL database and report back to Excel. It works as expected on a 32-bit machine, but since I moved over to a 64-bit work environment, the program has failed to run. Here is a sample of my code…

jaysoncopes
- 805
- 3
- 13
- 26
10
votes
2 answers
Why can't I do a "with x as (...)" with ADODB and Oracle?
I fail to execute an SQL query with a with clause via ADODB and Oracle.
That is, the following snippet works:
Dim cn As ADODB.connection
Set cn = ....
Dim rs As ADODB.recordSet
Set rs = New ADODB.Recordset
rs.Open "select 'foo' x from dual",…

René Nyffenegger
- 39,402
- 33
- 158
- 293
10
votes
3 answers
Using SQLDataReader instead of recordset
I am new to this and had this question. Can I use SQLDataReader instead of a Recordset. I want to achieve the following result in an SQLDataReader.
Dim dbConn As New ADODB.Connection
Dim rs As New ADODB.Recordset
Dim sqlstr As String = "SELECT…

nerts
- 101
- 1
- 1
- 3
10
votes
6 answers
The 'Microsoft.ACE.OLEDB.12.0' provider is not registered in the local machine
I'm getting this error when trying to run a vb application on a another pc. Is there some place I can download this DLL?

Alex
- 2,081
- 14
- 49
- 76
10
votes
2 answers
SQL injections in ADOdb and general website security
I have done pretty much reading and still don't understand 100% how some of the SQL injections happen!
I'd like to see, from those who know, concrete examples of SQL injection based on my example, so it could be replicated, tested and fixed. I have…

Ilia Ross
- 13,086
- 11
- 53
- 88
9
votes
4 answers
ASP Classic check for database NULL value in Recordset
I'm getting an ADODB Recordset and I need to check the value of a nullable column in ASP Classic. How can I tell whether it's null? AFAIK IsDBNull doesn't exist in ASP Classic, and all the Null testers ask whether the object is null, not its…

feetwet
- 3,248
- 7
- 46
- 84
9
votes
1 answer
Is adodb.dll included in a .NET distribution?
I was troubleshooting an issue on a customer's workstation and found that, to my surprise, adodb.dll was nowhere to be found on the customer's workstation.
Typically, I see the file in C:\Program Files\Microsoft.NET\Primary Interop Assemblies…

AngryHacker
- 59,598
- 102
- 325
- 594
9
votes
4 answers
Excel table loses number formats when data is copied from ADODB recordset
I'm updating an excel table from an ADODB recordset using the CopyFromRecordset method.
After the update, the numbers show up as dates wherever there are number columns.
The workaround I used until now is to format the columns back to numbers…

flungu
- 141
- 2
- 2
- 9
9
votes
3 answers
Passing current ADO Record to another function
Perhaps I've spent too much time in .NET, but it seems odd that I cannot easily pass the current Record of an ADO RecordSet to another method.
Private Sub ProcessData(data As ADODB.Recordset)
While (Not data.EOF)
ProcessRecord…

mr_plum
- 2,448
- 1
- 18
- 31
8
votes
6 answers
How to populate a ComboBox with a Recordset using VBA
There is some literature available at expert's exchange and at teck republic about using the combobox.recordset property to populate a combobox in an Access form.
These controls are usually populated with a "SELECT *" string in the 'rowsource'…

Philippe Grondier
- 10,900
- 3
- 33
- 72
8
votes
3 answers
ADODB connection from VBA stopped working
We've got an Exccel spreadsheet used to manage the rota for the out of hours support engineers. A while back, I added a bit of VBA code which automatically diverts the support phone numbers to the engineer's phone out of hours.
It does this by…

asc99c
- 3,815
- 3
- 31
- 54
8
votes
5 answers
ADODB open recordset fails / "Operation is not allowed when object is closed"
I have the following UDF in excel which uses ADO to connect to my MSSQL server. There it should execute the scalar udf "D100601RVDATABearingAllow".
For some reason the parameters that I try to append are not send to the sql server. At the server…

Lumpi
- 2,697
- 5
- 38
- 47
8
votes
1 answer
Could not load type 'ADODB.FieldsToInternalFieldsMarshaler' from assembly
I have the following code:
MAPITable mt = rStores.MAPITable;
Recordset rs = new Recordset();
rs = mt.ExecSQL(@"SELECT EntryID, ""http://schemas.microsoft.com/mapi/proptag/0x0FF60102"" As PR_INSTANCE_KEY from Name");
while…

Larry G. Wapnitsky
- 1,216
- 2
- 16
- 35
8
votes
4 answers
VBA to Prevent Keyboard Input While a Package Object (XML) is Read into ADODB Stream?
I am developing an application which opens and reads an XML document previously embedded in a PowerPoint presentation, or a Word document. In order to read this object (xmlFile as Object) I have to do:
xmlFile.OLEFormat.DoVerb 1
This opens the…

David Zemens
- 53,033
- 11
- 81
- 130
7
votes
2 answers
How to resume/retry a broken TADOConnection across the application?
I have a data module with a global TADOConnection (with the default KeepConnection set the true).
There are numerous datasets and queries in my existing application that use this global TADOConnection.
I was wondering if there is some smart way to…

zig
- 4,524
- 1
- 24
- 68