ado

Can I share a single database connection between ODBC and ADO?

Is it possible to have an ODBC connection and an ADO connection share the same underlying SQL Server connection, so that both are using the same SPID? Currently I am using SQLDriverConnect and ADODB::_ConnectionPtr->Open. I can make these connections in either order, so perhaps it's possible to open one making use of the other? (Langua...

Writing BLOB data to a SQL Server Database using ADO

I need to write a BLOB to a varbinary column in a SQL Server database. Sounds easy except that I have to do it in C++. I've been using ADO for the database operations (First question: is this the best technology to use?) So i've got the _Stream object, and a record set object created and the rest of the operation falls apart from there...

How to cast Variant to TADOConnection.ConnectionObject?

Hi guys. I've received a native COM ADOConnection which is stored in Variant. I would like to pass interface of this connection to the VCL wrapper TADOConnection. The problem is that either I am getting invalid typecast compiler message or acces violation. For example: procedure AssignNativeConnection(VCLConnection: TADOConnection; va...

Overhead of opening connection

When a connection to DB is opened using C# OPEN statement, does that impact the web server performance or only the Database? So, how does the repeated opening and closing of the database connection impact the web server and the database. Can somebody please give me some insight on this. Thanks. ...

SQL.Request method ..

Hi, can somebody tell me what's the equivalent of SQL.Request() method in excel 2007? It seems the add-in doesn't come built-in as part of excel versions after 2002. What's the solution for this ?? ...

ADO.RecordCount equals - 1 problem

When ever I try to access the RecordCount property, I always get a return value of -1. Below is my sample code. Set oConn = Server.CreateObject ("ADODB.Connection") oConn.Open Application("strConnectstring") Set rs = Server.CreateObject ("ADODB.Recordset") rs.ActiveConnection = oConn SQL = "Publications_PicoSearchListing" set rs = oConn...

Delphi 2009 ADO database access in cmShareDenyWrite mode

Hi there, I have a Delphi 2009 application that is attempting to open an ADO connection (dbGo) to a Microsoft Access .MDB file in cmShareDenyWrite mode, using the Jet 4.0 OLE DB provider. The goal is to open the .MDB file in read/write mode, but to prevent other applications from opening the file in write mode: Other applications access...

ADO Command Object Records Affected broken when moving to SQL Server 2008

My company is in the process of moving a database from SQL 2000 to SQL 2008. I am in the process of testing some of our legacy applications and came across a VB6 app that is running into a bug. The code is attempting to run a simple update for a record and check that the Execute method has affected more then one row using the RecordsAf...

TADOQuery filter and an expression always true.

I am trying to filter some records from a TADOQuery. I set the filtered property to true and when I set the filter to field='value', all works fine. I would like to dynamically build this filter by appending <space>AND field='value' to a value always true, and I thought 1=1 would do the trick. So I would have 1=1 as the default filte...

Run a SQL query on existing recordset?

I've created a 3rd recordset (disconnected) from two existing recordsets that came from different connections. Now, I'd like to run a SQL query on this 3rd recordset. I am using Excel VBA. thanks, Harry ...

How can I monitor the SQL commands send over my ADO connection?

i need intercept all the SQL commands that pass between an ADO connection component and a database server. something like the TSQLmonitor of dbExpress, but for ADO . Anybody know any third-party component that implements this functionality? UPDATE I want to do is to monitor the SQL statements programmatically (by code) from my appli...

Which event is fired before current record changes in ADOQuery and how NOT to change the current record?

In my application, there are these data components linked like so: DBGrid > (DataSource > ADOQuery > ADOConnection) DBNavigator > (DataSource > ADOQuery > ADOConnection) Whenever the user selects a different row from the DBGrid, or uses the DBNavigator, the ADOQuery's current record changes. Fine, but when the user makes some changes ...

Where do i put the ADO script in Excel?

For something i was trying to do in Excel i was suggested to use a ado script. i was given the ADO script as well. But I have no idea where do i put this script in excel. Can anyone please help? Thanks ...

deploy application with OraOLEDB provider

I developed an application that uses Delphi 7, ADO and ORACLE, the provider I use is OraOLEDB (I need use this provider because the BLOB fields support). now I want to distribute this application with the provider. I search the web to download the Oracle provider, but has a size of 174 mb. I need to install this file on all client machin...

using TRDSConnection component in Delphi

Someone can explain me what is the use of ADO component TRDSConnection.y give an small example of use. Thanks in advance. ...

How do I exclude null rows without excluding null cells when pulling Excel into C# using SQL (ADO)?

I have a query like the following: SELECT * FROM OPENROWSET('MSDASQL', 'Driver={Microsoft Excel Driver (*.xls)};DBQ=D:\test.xls','SELECT * FROM Sheet1$]') This brings back rows that are all null if they were ever edited and then deleted. I want to exclude those, but still include rows that have good data but possible null cells. My ...

Asynchronous sql queries using ADO

Is there a way to place a sql query and call a callback function in C++ when the results are ready? I know there is a way to do this in ado.net, but this is a native environment, so I can't use .net. ...

string incorrectly translated by ado

I have a database with collation SQL_Latin1_General_CP1_CI_AS. In that database I have a varchar field. There is a row in that database with the string "ó" (single character 243 in codepage 1252). I have a simple ASP page that sets the codepage to 65001, reads that row (using adodb), and sends it out to the browser. Everything works ...

How can I get the # of rows affected by a statement using ADO with JavaScript?

I'm using ADO in a JScript (Microsoft JavaScript dialect) Windows Scripting Host script to update a SQL Server table. I'd like to get the number of rows affected by the update in the script, but JavaScript doesn't have pass-by-reference and so I can't do the usual thing where I receive the records affected from the Command#Execute functi...

Recordset Update errors when updating sql_variant field

I'm using C++ and ADO to add data to a SQL Server 2005 database. When calling the Recordset Update method for a sql_variant column I'm getting the error DB_E_ERRORSOCCURRED and the error message Multiple-step OLE DB operation generated errors. Check each OLE DB status value, if available. No work was done. If the value I'm adding is NU...