Re: Access vs. SQL Server in TADOConnection
From: Andreas Schmidt (a_j_schmidt_at_rocketmail.com)
Date: 10/22/03
- Next message: Paulo Henrique: "Re: SQL Server / MySql / ADO Problem"
- Previous message: Andreas Schmidt: "Re: Reopening/changing DB at runtime"
- In reply to: Perry Way: "Access vs. SQL Server in TADOConnection"
- Next in thread: Perry Way: "Re: Access vs. SQL Server in TADOConnection"
- Reply: Perry Way: "Re: Access vs. SQL Server in TADOConnection"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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
- Next message: Paulo Henrique: "Re: SQL Server / MySql / ADO Problem"
- Previous message: Andreas Schmidt: "Re: Reopening/changing DB at runtime"
- In reply to: Perry Way: "Access vs. SQL Server in TADOConnection"
- Next in thread: Perry Way: "Re: Access vs. SQL Server in TADOConnection"
- Reply: Perry Way: "Re: Access vs. SQL Server in TADOConnection"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|