ado

SQL Return values in Delphi via ADO

Hi. Im having this function to determine weather a user exists in a database or not DM is my DataModule AQ_LOGIN an ADOQuery BENU is my Table filled with Users and their Password Here comes the code: function UserCheckExist(Login, pw: string): boolean; begin with DM do begin AQ_LOGIN.Close; AQ_LOGIN.SQL.Clear...

#import'ing msado15.dll, is there another way?

In all ADO C++ code I can find, there is a line #import "C:\Program Files\Common Files\System\ADO\msado15.dll" no_namespace rename("EOF", "EndOfFile") I understand that this line "incorporate information from a type library", and that "The content of the type library is converted into C++ classes". What? I'm also looking for the he...

Coinitialize error on IntraWeb using ADO

Already asked on the Evil Exchange, but as always that was no help. I'm having this problem today: When creating a stand alone web application using IntraWeb, I get this exception in the IDE when I try to test out a session from my app in the browser: First chance exception at $7C812A6B. Exception class EOleSysError with messag...

Delphi 6 with ADO + Oracle returns NUMBER with different precision, generating BCD overflow

Hello, I'm having a problem with Delphi 6 + Oracle 10gR2 + ADO + ClientDataSet. Whenever I run a aggregate function on a field NUMBER(19,9), the resulting column returns a NUMBER datatype to Delphi, and on some machines it loads as a TBCDField with a precision of 38, and everything goes well, but on some machines it loads as a TBCDField...

A better way of passing parameters to a TADOStoredProc (Delphi)

Hi, I am needing to convert a large amount of SQL queries into stored procedures. I have some code that updates about 20 or 30 values at one time in one Delphi procedure. I can handle creating a stored procedures to do such a thing. The problem is my way to pass parameters to stored procedures is very bulky like this: with stored_pr...

VBScript: Passing a parameter with a null value to a stored procedure?

In VBScript (ASP environment), is it possible to pass a parameter with a null value to a stored procedure? ...

ADO+Running a Stored procedure via recordset or command, any difference?

Hi Sometimes we run a SP in client application (vb6.0) using recordset and sometimes, by a command object . So, what is the benefit of using command object instead of a recordet? ...

Which is locale-aware: OleDb.Currency or OleDb.Decimal?

This is two-fold. I have an Access database and a table containing MS Access Currency fields. My customers in the USA use decimal values like 1.23 and my customers in Ecuador use decimal values like 1,23. I have some ADO legacy code and I've tried creating ADODB Parameters with type adDecimal and also with type adCurrency. In either ...

ASP error "Key column information is insufficient or incorrect." when updating mySQL

I have the following subroutine in a classic ASP class that calls the ADO UPDATE method. I'm using mySQL db using ODBC driver 5.1. If I all the subroutine I get the following error: Microsoft Cursor Engine error '80004005' Key column information is insufficient or incorrect. Too many rows were affected by update. Public Sub Update(tab...

How to add a field programatically to a TAdoTable in Delphi

In my Delphi 2009 application I need to check if a field exists and if it doesn't add it during application execution. I have figured out the test for the field, but cannot get a field to add. I tried this var fld : TStringField; begin if not ADOConnection1.Connected then ADOConnection1.Open; fld := TStringField.Create(tbl...

How to check if a SQL query is valid for writing with ADO?

My app has an advanced feature that accepts SQL queries written by the user. The feature should include a "Validate" button to check if the query is valid. The most simple way I found to do this using ADO is just trying to run the query and catch possible exceptions. But how can I also check if the query enables to add new records or to...

How Do I Copy a table from one Access DB to another Access DB

I am trying to automate a process to create a secondary database from a primary. Both DB's (MS Access) contain one table; the table in the secondary DB is a subset of the table in the primary. Is there a simple way to copy a recordset frone one DB to another? I am using VBScript and ADO. Thanks! ...

Filling listbox from ado query far slower in vb2005 than vb6. Can I speed it up?

I converted some code from vb6 to vb2005 that opens a recordset and populates a listbox with about 8,000 names. It uses classic ado. The vb6 code does it in about 0.75 of a second, the first vb2005 code does it in about 5.5 seconds while the second vb2005 code does it in about 4.5 seconds. Is there any way to improve the vb2005 performa...

What is an Ado.net equivalent of this Ado sample?

AFAIK ado.net datareaders and datasets don't seem to support joins in sql statements. Is it possible to retrieve the ado.net equivalent of this ado recordset using just the information presented in this ado/vb code : I am asking the question this way as I am trying to largely automate the conversion of ado to ado.net Dim myconn As...

ADO Issue, "@IsNew" parameter causing no results to be returned?

This is ADO in classic ASP. I have a stored procedure with a parameter @IsNew of type int. I can call it via SQL: EXEC [dbo].[SearchVehicles] @WebsiteName = N'AMSVans', @SortOrder = N'Year DESC,Status ASC', @Statuses = N'Unsold', @IsNew = 1 And the return sets are exactly as expected. However, when I attempt to use it in my ...

Is Delphi's TADOConnection thread-safe?

I'm writing a Delphi 7 application which needs to access the same SQL Server database from many different threads simultaneously. Can I use a single shared TADOConnection, or must each thread create their own? ...

Is it really wise to close connections immediately with Jet/ADO?

I've done extensive research on this topic and intensive discussions with my co-workers. The general consensus seems to be, that a database connection should be opend when needed and closed immediately. Any caching/pooling of connections should be done by the database driver or some other layer, but not by the application itself. But ...

ADO or DBX using Delphi

Which is better (and for what reasons) to use to connect to MS SQL, Oracle or Firebird from a Delphi Win32 application -- ADO or DBX (Database Express)? Both allow you to connect to the major databases. I like the way ADO does it all with a connection string change and the fact that ADO and the drivers are included with Windows so noth...

Delphi: “Parameter object is improperly defined. Inconsistent or incomplete information was provided.”

This is a Function that does the following: Create a random Token with 8 length Insert that Token into the Database > If the User has already a token, update it. > If the User has no token, insert it. procedure createToken(BenuNr: integer); var AQ_Query: TADOQuery; strToken: string; intZaehler: int...

Obtaining an inserted recordid on Oracle db

I'm using Oracle on database server, from an XP client, using VB6 and ADO. In one transaction, I'm inserting one record into a parent table, which has a trigger and sequence to create a unique recordid, then that recordid is used for the relationship to a child table for a variable number of inserts to the child table. For performance,...