ado

How to use SQLite in c# without an ADO wrapper

Is this even possible? All of the aritcles I have read state that an ADO wrapper is necessary, but the SQLite website implies that nothing other than their DLL is needed. IF it is possible, then I would expect there to be code examples out there. ...

ADO/SQL Server: What is the error code for "timeout expired"?

i'm trying to trap a "timeout expired" error from ADO. When a timeout happens, ADO returns: Number: 0x80040E31 (DB_E_ABORTLIMITREACHED in oledberr.h) SQLState: HYT00 NativeError: 0 The NativeError of zero makes sense, since the timeout is not a function of the database engine (i.e. SQL Server), but of ADO's internal timeout m...

MS Access: Why is ADODB.Recordset.BatchUpdate so much slower than Application.ImportXML?

I'm trying to run the code below to insert a whole lot of records (from a file with a weird file format) into my Access 2003 database from VBA. After many, many experiments, this code is the fastest I've been able to come up with: it does 10000 records in about 15 seconds on my machine. At least 14.5 of those seconds (ie. almost all th...

Why could "insert (...) values (...)" not insert a new row?

Hi, I have a simple SQL insert statement of the form: insert into MyTable (...) values (...) It is used repeatedly to insert rows and usually works as expected. It inserts exactly 1 row to MyTable, which is also the value returned by the Delphi statement AffectedRows:= myInsertADOQuery.ExecSQL. After some time there was a temporary n...

ado.net slow updating large tables

The problem: 100,000+ name & address records in an access table (2003). Need to iterate through the table & update detail with the output from a 3rd party dll. I currently use ado, and it works at an acceptable speed (less than 5 minutes on a network share). We will soon need to update to access 2007 and its 'non jet' accdb format to ...

Oracle OLEDB Connection Pooling and Invalid Connections

We are using ADO to access Oracle 10g release 2, Oledb provider for Oracle 10g. We are facing some issue with the connection pooling. The database reside on the remote machine and connection pooling is occuring as it should. But if the remote machine goes down for some reason, the connection is returned from the pool and query on that co...

How to retrieve all errors and messages from a query using ADO

When a SQL batch returns more than one message from e.g. print statements, then I can only retrieve the first one using the ADO connection's Errors collection. How do I get the rest of the messages? If I run this script: Option Explicit Dim conn Set conn = CreateObject("ADODB.Connection") conn.Provider = "SQLOLEDB" conn.ConnectionStrin...

Access as a front-end to SQL Server - ADO vs DAO?

I have a project that will be using Access 2003 as the font-end and the data being stored in SQL Server. Access will connect to SQL Server via linked tables with all the database logic (stored procedures, views) within SQL Server. Given this setup, would it be better to use ADO or DAO within Access? Is it just a matter of preference or ...

How to execute stored procedure from Access using linked tables

I have an Access 2003 database that connects to a SQL Server 2008 box via ODBC. The tables from SQL Server are connected as linked tables in Access. I have a stored procedure on the SQL Server that I am trying to execute via ADO code. The problem I have is that Access cannot seem to find the procedure. What do I have to do within Access ...

Access, ADO & 64-bit

We have a large codebase that uses ADO under 32-bit, and we need to convert the code to 64-bit. We were using the Jet provider, but I know this is not supported under x64. We're importing definitions from msado15.dll. As of a while ago a 64-bit version of this DLL became available, but we are unable to get it to work. I have written...

Update Field in ADO Recordset and Re-sort values in Classic ASP

Here's the current situation: I have a recordset of products. The price of these products depends upon other information elsewhere on the page. So, as I loop through the recordset for output, I calculate the price using a function, and display it. This all works wonderfully. Now, for the new wrinkle. I need to be able to sort the pr...

Converting DAO to ADO

I am working with an Access 2003 database that has a subroutine using DAO code. This code loops through the table definitions and refreshes the ODBC connection string. I would like to convert this to ADO so I do not have to reference the DAO object library. Here is the code ... Public Sub RefreshODBCLinks(newConnectionString As String) ...

Unable to retrieve more than 8 bytes from a text field in sql server via Delphi ADO

Delphi 7 SQLSERVER 2000 I am having a problem with a legacy application that I am unable to recompile, because when i do I lose the ability to retrieve documents from a text field they are stored in and write to disk, I only get the first 8 bytes. I have a much larger application, but a really simple app is recreating the issue. Code ...

MySql N00b, problem with timestamp

There are some other questions where people have problems with timestamp being all zeros. I have checked them and this is not a duplicate. I declare a table like this: CREATE TABLE `my_db`.`my_table` ( `time_stamp` timestamp NOT NULL, `author` varchar() NOT NULL, `text` text NOT NULL, `md5` int(11) NOT NULL, PRIMARY KEY (`ti...

Calling SQL Server stored procs from Delphi with arguments?

I'm trying to call SP_SPACEUSED from Delphi 2010 using ADO. I can call it without arguments by using TSQLStoredProc, and setting the StoredProcName. This gives me the database size. I now need a specific table size, and SP_SPACEUSED takes a single arugument, @objname. How do I pass this as an argument. I have tried passing this as a para...

Why doesn't Microsoft support OLE DB connections to SQL Azure?

At the MSDN website it says, "Connecting to SQL Azure by using OLE DB is not supported." There are other places on the web where folks report that it works fine for them after tweaking the server name in the connection string, such as here and here. Even SQL Server's Analysis Services uses OLE DB to connect to SQL Azure! I develop a n...

What's the most efficient way for accessing a single record in an ADO recordset?

I want to access individual records in a classic ADO recordset without enumerating over the entire recordset using .MoveNext. I'm aware of using AbsolutePosition as well as .Filter =. What's the best way? More Details: I'm likely going to be accessing the recordset several times pulling out individual records that match a list of reco...

working with ADOQuery1 & ADOQuery2

i have a ADOQuery1 that is my master table and now i whant to use onother one ADOQuery2 for my detail Table but realy i don´t find the right way to work out the solucion. ADOQuery1 nr- Autonum name local quant. ADOQuery2 Nro _ Autonum name l1 ...

Selecting 2 tables from 2 different databases (ACCESS)

hi guys, here is the connection i have strCon="DBQ=" & Server.Mappath("db.mdb") & ";Driver={Microsoft Access Driver (*.mdb)};PWD=password;" set adoCon=server.createobject("adodb.connection") adoCon.Open strCon so in order to work with the 2 databases i have 2 adoCon and when i do the select i select from each db i need now for the p...

Proper way to close ADO recordset in Access when passing to calling method?

I am using Access 2003 to access data stored in a SQL Server database via ADO. Most often I obtain the data using stored procedures. I execute the stored procedures via ADO in a separate function that returns a recordset. When returning a recordset from a function where is the best place to close the recordset and release it's hold on me...