Re: Access vs. SQL Server in TADOConnection

From: Andreas Schmidt (a_j_schmidt_at_rocketmail.com)
Date: 10/22/03


Date: Wed, 22 Oct 2003 11:00:54 +0200


"Perry Way" <no.delphipro.spam@no.spam.earthlink.net> schrieb im Newsbeitrag
news:3f95c8c1$1@newsgroups.borland.com...
> I am writing a .dll in Delphi that uses a TADOConnection.
>
> I had a problem earlier with that ubiquitous error "Multiple-step OLE DB
> operation generated errors. Check each OLE DB status value, if available.
No
> work was done" when I tried to call TADOConnection.Open();

go like this:

//
OutputDebugString(ADOConnection1.ConnectionString);
try
   ADOConnection1.Open;
except
   on E:Exception do
   begin
      // add all possible information
      E.Message := E.Message+#13#10#13#10+GetAllADOErrors(ADOConnection1);
      raise; // raise the exception again
   end;

uses ...,ADOint;

function GetAllADOErrors(cn: TADOConnection):string;
var
   i : Integer;
   e : ADOInt.Errors;
begin
   e := cn.ConnectionObject.Errors;
   for i := 0 to e.Count-1 do
   begin
      Result := Result +
         Format('#%d %s'#13, [e.item[i].Number, e.Item[i].Source]) + #13
         + e.Item[i].Description+#13+
         e.Item[i].SQLState+#13;
   end;
end;

> I am able to make a connection to any SQL Server database, but I am
> incapable of connecting to Access databases. When I change the connection
> string to point to an Access database, I get that error above.

Please tell us the connectionstring.

hth
Andreas

--
Database Explorer for ADO (Freeware)
http://mitglied.lycos.de/ajs/adodeskexe.zip


Relevant Pages

  • Access vs. SQL Server in TADOConnection
    ... I had a problem earlier with that ubiquitous error "Multiple-step OLE DB ... I am able to make a connection to any SQL Server database, ... incapable of connecting to Access databases. ...
    (borland.public.delphi.database.ado)
  • Re: DTS Transform Task With Visual Foxpro
    ... How are you connecting to your Fox tables? ... ODBC? ... latest FoxPro and Visual FoxPro OLE DB data provider from ... Cindy Winegarden MCSD, Microsoft Visual FoxPro MVP ...
    (microsoft.public.sqlserver.dts)
  • Need connection/thread pooling examples (isapi, Soap, Intraweb)
    ... connecting to a MSSQL database using tAdoconnection. ... The connection process is notoriously slow because it involves setting MSSQL ...
    (borland.public.delphi.database.ado)
  • Word crashes when link Access via OLE
    ... I have tried to link to various Access databases with old ... and new Word merge files via the default connection - ... I tried connecting via DDE and that appears to work fine. ... Is there a downside to using DDE instead of OLE? ...
    (microsoft.public.word.mailmerge.fields)
  • Re: Office Pro XP Mail Merge
    ... What's the exact wording? ... Do you know whether you're connecting using OLE DB, DDE or ODBC? ...
    (microsoft.public.word.mailmerge.fields)