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
13
votes
3 answers

BDE vs ADO in Delphi

Please note the Edit below for a lot more information, and a possible solution We recently modified a large Delphi application to use ADO connections and queries instead of BDE connections and queries. Since that change, performance has become…
JosephStyons
  • 57,317
  • 63
  • 160
  • 234
13
votes
2 answers

Query timeout expired when trying to run a short procedure

Here's my connection string: Global Const strConn As String = _ "PROVIDER=SQLNCLI10;" & _ "P-SSWORD=blahblah;" & _ "USER ID=blahblah;" & _ "INITIAL CATALOG=blah;" & _ "DATA SOURCE=blah;" & _ "CONNECT TIMEOUT=0;" & _ …
whytheq
  • 34,466
  • 65
  • 172
  • 267
12
votes
3 answers

Getting VB6 ADO application to work in Windows 7

I have inheritted several old VB6 applications that currently cannot be rewritten in .NET. These old applications all use ADO, and compile fine on my XP machine. Since switching to a Windows 7 machine, the applications compile fine, but when they…
Loki70
  • 613
  • 4
  • 15
  • 36
12
votes
3 answers

Azure DevOps make project read only

We have some old ADO/VSTS projects that we want to archive and make read only. Each project has work items, builds, git repos, etc... at the moment the only methods I have found are painful. Remove all groups except read only group and add users in…
james
  • 617
  • 7
  • 25
12
votes
1 answer

Connect to Sun LDAP with ADO

I want to connect (and get user's group) to a Sun LDAP server with a Delphi program. I think ADSI works only with Microsoft LDAP. I try it with ADO, but I can't connect. Can someone show some code how I would do this?
Partizan22
  • 129
  • 3
12
votes
3 answers

How to properly add new records to empty recordset manually?

How to add new records to a new & empty ADODB.Recordset manually? Right now, here's what I'm doing that isn't working: Dim rs as ADODB.Recordset rs.Open Dim Fields() as String Fields(0) = "SomeFieldName" Dim Values() as String Value(0) =…
bitcycle
  • 7,632
  • 16
  • 70
  • 121
12
votes
4 answers

How can I detect that a TadoConnection lost the communication with the server?

I need to detect when a TAdoConnection component has lost the connection with the server. I've tried using the OnDisconnect event but this only fires when the Close method is called or the Connected property is set to false. Another option I've…
Salvador
  • 16,132
  • 33
  • 143
  • 245
12
votes
2 answers

Classic ADO and Table-Valued Parameters in Stored Procedure

Is there some way to pass a table-valued parameter to a stored procedure in SQL Server via classic ADO?
MJLefevre
  • 815
  • 1
  • 8
  • 15
12
votes
1 answer

escape space in connection string

I am trying to connect to a SQL server database using ADO. The password contains a space as the last character. When building the connection string, how should I escape the password? MSDN says put it in single or double quotes but that does not…
Z .
  • 12,657
  • 1
  • 31
  • 56
12
votes
7 answers

Using SQLITE with VB6

I am currently using an MSAccess mdb file for a redistributable app. A while ago I found out about SQLite, as an alternative to my solution, but the binaries they provide do not offer the possiblilty of using them as an object in VB6. (Or at least…
Manuel Ferreria
  • 1,216
  • 1
  • 13
  • 23
11
votes
8 answers

Is it possible to create a deadlock with read-only access?

I have a VB6 application accessing a single table on a MSSQL2000 server via ADO. I'm using read-only access (adOpenStatic, adLockReadOnly) There are other applications in the network which do make changes to the table. For some reason I'm getting…
Daniel Rikowski
  • 71,375
  • 57
  • 251
  • 329
11
votes
2 answers

ADO Recordset data not showing on form

I've got a frustrating issue on MS Access 2010 that I would at this stage qualify as a bug. And after having tried all possible workarounds, I am out of ideas and rely on you. Context Huge Ms Access 2010 application with 25k lines of VBA and >50…
Thomas G
  • 9,886
  • 7
  • 28
  • 41
11
votes
3 answers

Why does scrolling through ADOTable get slower and slower?

I want to read the entire table from an MS Access file and I'm trying to do it as fast as possible. When testing a big sample I found that the loop counter increases faster when it's reading the top records comparing to last records of the table.…
saastn
  • 5,717
  • 8
  • 47
  • 78
11
votes
3 answers

Delphi 7: ADO, need basic coding example

I am a complete beginner here. Can someone please post some Delphi code to create a database add a simple table close the database then, later open a database read each table read each field of a given table perform a simple search Sorry to…
Mawg says reinstate Monica
  • 38,334
  • 103
  • 306
  • 551
11
votes
4 answers

VB6 ADO Connection - How to Check if in Transaction?

Is there any way to tell, using just the ADODB.Connection object, whether or not it is currently involved in a transaction? I'd love to be able to test this on the connect object itself, without relying on keeping a boolean next to it updated.
Tom Tresansky
  • 19,364
  • 17
  • 93
  • 129