Questions tagged [ado]

Microsoft ActiveX Data Objects (ADO) is a COM based package for accessing databases such as SQL Server or data sources such as Excel spreadsheets. ADO.NET provides improvements over ADO along with integration with the .NET Framework for .NET developers. ADO.NET tag should be used for ADO.NET specific questions.

Microsoft developed ADO as a set of COM objects providing a middleware between an application and ODBC for accessing data sources. With ADO, the programmer has a more generic interface to database engines such as SQL Server as well as to other data sources such as Excel spreadsheets.

ADO provides a set of COM objects which a programmer can instantiate and then use for particular data source accesses. Being COM objects, ADO can be used with a variety of programming languages. The ADO interface allows SQL statements to be passed to a data source that supports SQL.

ADO contains 4 collections and 12 objects.

ADO.NET is a replacement for ADO in the .NET Framework.

Links:

References:

2633 questions
116
votes
7 answers

Is there a way to retrieve the view definition from a SQL Server using plain ADO?

I'm successfully extracting column definitions from databases hosted on a SQL server using the ADO Connection OpenSchema() call in its various incarnations so I can programmatically recreate those tables in another SQL database. So far, so good. The…
Timo Geusch
  • 24,095
  • 5
  • 52
  • 70
47
votes
3 answers

How to deploy SQL Server Compact Edition 4.0?

How do i deploy Microsoft SQL Server Compact 4.0? SQL Server Compact Edition (currently at version 4.0) is: a free, embedded database that software developers can use for building Windows desktop applications. It has a small footprint and supports…
Ian Boyd
  • 246,734
  • 253
  • 869
  • 1,219
30
votes
2 answers

VBA, ADO.Connection and query parameters

I have excel VBA script: Set cоnn = CreateObject("ADODB.Connection") conn.Open "report" Set rs = conn.Execute("select * from table" ) Script work fine, but i want to add parameter to it. For example " where (parentid = myparam)", where myparam…
Alexey
  • 593
  • 1
  • 5
  • 14
25
votes
3 answers

Do ADO components, especially TADOCommand, work more reliably with un-named, or named parameters, in some cases?

There are several questions on StackOverflow that seem to have answers that contradict each other on the subject of ADO/OleDB, delphi TADOQuery/TADOCommand and the subject of parameters. Parameters can be introduced two ways, in the CommandText or…
Warren P
  • 65,725
  • 40
  • 181
  • 316
23
votes
6 answers

Exporting MS Access Forms and Class / Modules Recursively to text files?

I found some code on an ancient message board that nicely exports all of the VBA code from classes, modules and forms (see below): Option Explicit Option Compare Database Function SaveToFile() 'Save the code for all modules to files…
leeand00
  • 25,510
  • 39
  • 140
  • 297
22
votes
3 answers

Difference between ADO and DAO

This is not a question about which is better, but rather a question regarding why they differ functionally. The problem I was running into has been handled, but I am curious as to why this behavior is happening. Background - using Excel vba to pull…
APrough
  • 2,671
  • 3
  • 23
  • 31
18
votes
6 answers

How to check if an OLEDB driver is installed on the system?

How can I make sure that a certain OLEDB driver is installed when I start my application? I use ADO from Delphi and would like to display a descriptive error message if the driver is missing. The error that's returned from ADO isn't always that…
17
votes
3 answers

Extracting raw data from a PowerPivot model using Python

What seemed like a trivial task turned into a real nightmare when I had to read in some data from a PowerPivot model using Python. I believe I've researched this very well over the last couple of days but now I hit a brick wall and would appreciate…
akavalar
  • 491
  • 1
  • 6
  • 14
17
votes
3 answers

Access-SQL: Inner Join with multiple tables

i have multiple tables in a database: tblOjt ID studentid courseid companyid addresseeid dateadded datestarted dateended ojthours 1 3 1 1 1 9/25/2013 …
Kay Singian
  • 1,301
  • 8
  • 20
  • 33
17
votes
1 answer

Can I check to see if CoInitialize has been called or not?

In a multi-threaded environment with ADO database connections, I would like to know if CoInitialize has been called or not. How would I go about checking this?
Jerry Dodge
  • 26,858
  • 31
  • 155
  • 327
14
votes
5 answers

There is already an object named '##Temp' in the database

I have a stored procedure on SQL Server 2000. It contains: select ... into ##Temp ... ... drop table ##Temp When I run the stored procedure with ADO a second time, it prompts: There is already an object named '##Temp' in the database. Could anyone…
phoenies
  • 537
  • 2
  • 5
  • 16
14
votes
4 answers

insert full ADO Recordset into existing ACCESS table WITHOUT LOOP

I have a filled ADO recordset in my VBA module. I also have a table in ACCESS that has exactly the same structure as the recordset. Now I fill the table using a loop (which is fine) going through each dataset record. What I am wondering: is there a…
Barrie van Boven
  • 199
  • 1
  • 1
  • 10
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
13
votes
2 answers

Read and write to an access database using Javascript

first I want to mention that I am aware that in web interaction with databases should always be with server side languages due to security reasons and for the fact that javascript as is doesn't offer and compatibility with the windows file system. …
Jake
  • 1,380
  • 3
  • 14
  • 27
13
votes
3 answers

Mysql is not appearing in "Choose Data Source" for Visual studio 2017

As you can see i've already installed the necessary mysql packages such as Mysql for Visual studio and Connector/NET but no matter what the mysql is not appearing in Visual studio 2017 Data source menu, any suggestion ? :
kkafkas
  • 322
  • 1
  • 3
  • 13
1
2 3
99 100