ado

Is there an equivalent to RDO.OpenResultset in ADO ?

Hello, all is in the title :-) Some explanation : In order to use a vb6 with C# (COM / Interop) I have a performance issue with Data Access. I don't know why but the code is four times slower in C# via Interop. I'm trying to find a workaround and I would to replace the rdo by ADO to gain performance. old code (with rdo) : strSelect ...

ADOQuery closes after contructor

in Delphi 7 , useing TADOQuery. in the contructor i do ADOQuery.open; then when another function is called from outside the form, the ADOQuery is closed why? constructor TClass1.Create(AOwner: TComponent; MyParam: TProgramParam); begin inherited; ADOQuery.Open; ADOQuery.Locate('fieldName',Param); end; ...

What's wrong with my SQL statement?

SELECT * FROM [makes$] WHERE "Corporate Name"='Champion Enterprises, Inc.' I'm running this query on an XLS excel file using ADO in VBA. There are about 10-20 records containing this corporate name but it returns EOF. I'm fairly new to database but I'm certain everything is correct aside from my SQL statement. If I SELECT * FROM [ma...

Can a parameter safely be removed from a Delphi TADOCommand at runtime.

My Delphi 2006 TADOCommand has it's CommandText (including parameters), Prepared (True), ParamCheck (True) properties all set at design time. Is there a way for me to go about deleting some of it's Parameters at run time, without having to change the CommandText to accomodate these changes. This is desireable in the...

Please help, Excel ADO OLEDB SQL Statement problem

I'm reading from an excel XLS worksheet with no header rows. Some cells in the column have a list of numbers like 12345,12346,12347,12348. Other cells only have one number 12345. The "LIKE" operator finds the number when there is multiple numbers in a cell, but doesn't find the cells where only one number exists. SQL = "SELECT * FROM [...

Extract query definition from JET database via ADO

I have a program in Delphi 2010 that uses a JET (mdb) database via ADO. I would like to be able to extract the definitions of some of the queries in the database and display them to the user. Is this possible either via SQL, some ADO interface, or by interrogating the database itself (I don't seem to have rights to MSysObjects). ...

SQL Server table to be retrieved using ADO in VC++

I have a table with 2 columns, PatientID and TestNo. PatientID can be same for more than 1 records but the TestNo will be always distinct. I want to know the SQL statement which can fetch me the highest value in the TestNo field among all the records which has same PatientID basically max(TestNo) . I want to pass the specific PatientID ...

vb6 : what's wrong with this tsql procedure call?

I have the following procedure call in vb6: dim rs as adodb.command dim cnn as adodb.connection with rs set .activeconnection = cnn .CommandType = adCmdStoredProc .CommandText = "sp_qryUpdate" .CommandTimeout = 0 .Parameters("@uidbatch").value = lngBatchID .Execute , , adExecuteNoRecords end with I re...

Using ROWTYPE input parameters in TADOStoredProc

We have a stored procedure which I'd like to call from my client: PROCEDURE p_my_proc(p_id IN my_table.id%TYPE, p_record IN my_table%ROWTYPE); In the client I want to call this procedure using TADOStoredProc, but haven't found a way to assign the record to a parameter. I have a TDataSet with the record in i...

Accessing mdb database through ADO slow on Vista

Hi, I'm supporting a customer with strange, very specific mdb access slowdowns. We have a big ( > 100MB) mdb file which is read by our app through ADO, and on some Vista machines (and only on those Vista machines), some, but not all queries take a very long time to execute. The slow query: SELECT * FROM [Table] WHERE [FieldA] = _numbe...

How to return a database connection from a function?

I need to modify some legacy code that was written in classic ASP (VBscript). I have a line that sets a database connection like this: set m_conn=OpenConn() I believe that the OpenConn() function is in a DLL somewhere. This is bad news because we can't locate the source for that dll. So, I've been working on a replacement for that fu...

Accessing varchar field containing extended ASCII characters using ADO

Hi folks, I'm using ADO to connect to an SQL 6.5 Server and extract data from a column storing text data (field type returns as adLongVarChar). The column data was updated from an old legacy DOS system and contains a few extended ASCII characters like 0xFB (square-root glyph in Code Page 437). The problem is when I read the Field's V...

Why does ADO BeginTrans() do something different than "BEGIN TRANSACTION"?

I've run into some surprising behavior while using ADO with C++ and Microsoft SQL Server 2008 (express). Essentially, I had code that did this: //pseudocode pseudocode pseudocode adoConnection->Execute("BEGIN TRANSACTION;"); Insert( adoRecordsetPtr ); SelectAll( adoRecordsetPtr ); adoConnection->Execute("COMMIT TRANSACTION;"); But...

Delphi ADO + bookmarks

hi! I am currently developing an application that uses databases dynamically. meaning it is designed to work with any db, at any time, and any structures. my concern is that I wish to "tag" or bookmark certain records, therefore I will require to use the Filter property to do some searching, and in the end, I wish to delete the filter...

Delphi ADO + MySQL + Developer Express Grid

I have problems using Mysql with MySQL Connector, I can successfully connect to a database on the net via ODBC, and in my grid I can display many records, however in the grid (Developper express) I seem to be unable to scroll. i think it is related to cursor locations etc etc, but I am not sure. also recordcount and recno seems also not...

Delphi: Creating Access DB (.mdb) without Ms Access

Hi, Is there a way to create Access databases (.mdb) without actually using Ms Access? I'd like my app to create it instead (when user presses "New Document" on the toolbar). I'm using Delphi 5 Ent. Thanks in advance! :-) ...

.NET 4.0 application to use Microsoft ADO Ext. 6.0 for DDL and Security

I try to compile Xsd2Db solution in .NET 4.0 framework. I add a reference to "Microsoft ADO Ext. 6.0 for DDL and Security" and use it in this way - using System; using System.IO; using ADOX; namespace Xsd2Db.Data { /// <summary> /// Summary description for JetDataSchemaAdapter. /// </summary> public sealed class JetDataSchemaAdap...

Ado.Net RecordSet member equivalent?

I'm currently re-writing a Vb6 program relying on ADO into C# w/ ADO.NET. I've run into several places in the original code with stuff like this: Dim rs As New Recordset rs.CacheSize = 500 Call rs.Open(sSql, cnMeta, adOpenForwardOnly, adLockReadOnly) Is there an equivalent (or even a need for an equivalent) to ADO.RecordSet.CacheSize...

What does the "Cannot change the ActiveConnection property of a Recordset object which has a Command object as its source" error mean?

I've gotten the "Cannot change the ActiveConnection property of a Recordset object which has a Command object as its source" error in my classic asp page a couple of times, usually after I've just changed a stored procedure. In the past, uninstalling and reinstalling the COM+ applications and a reset of IIS has seemed to fix this proble...

Delphi: TAdoQuery Memory Leak?

Hi, I'm developing as small diabetes program using Delphi 5 and ADO. I do a little query like this: function GetLowestGlucoseLevel(StartDate:string;EndDate:string): Integer; var Q:TADOQuery; begin try Q:=TADOQuery.Create(Application); //Separate unit, owner set to App Q.Connection:=dtMod.ADOCon; Q.DisableControls;...