ADO Brick Wall
From: Chris Spencer (chris_at_tufware.com.au)
Date: 11/21/03
- Next message: Kovács Ferenc: "Re: Filter problems - two questions"
- Previous message: Pham Toan Thang: "Re: How to pass Unicode string into a query?"
- Next in thread: Martijn Tonies: "Re: ADO Brick Wall"
- Reply: Martijn Tonies: "Re: ADO Brick Wall"
- Reply: DRS: "Re: ADO Brick Wall"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Fri, 21 Nov 2003 20:10:32 +1100
I have the need to return a recordset as a variant from a DLL written in
Delphi to allow an application to process it. The app is not Delphi.
I have the following which is not quite corrrect. Any pointers on what I
need to do to get the connection working coorectly and be able to return the
variant back?
Thanks
Function GetSQLQuery(iServer:pChar; iDB:pChar; iSQL:pChar) : INTEGER ;
stdcall;
var
sConnect : String ;
sServer : String ;
sSQL : String ;
sDB : String ;
vResult : OLEVariant ;
vADO : TADOConnection ;
iRows : Integer ;
begin
sServer := iServer ;
sDB := iDB ;
sSQL := iSQL ;
vADO := TadoConnection.Create(Nil);
sConnect := ('Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist
Security Info=False;Trusted_Connection=yes;Initial Catalog=' + sDB + ';Data
Source=' + sServer) ;
vADO.LoginPrompt := False ;
vAdo.ConnectionString := sConnect ;
vAdo.Open ;
vResult := vADO.Execute( sSQL, cmdUnknown
,[eoAsyncFetchNonBlocking]) ;
vADO.Close ;
VADO.Free;
result := vResult ;
End;
Chris Spencer
- Next message: Kovács Ferenc: "Re: Filter problems - two questions"
- Previous message: Pham Toan Thang: "Re: How to pass Unicode string into a query?"
- Next in thread: Martijn Tonies: "Re: ADO Brick Wall"
- Reply: Martijn Tonies: "Re: ADO Brick Wall"
- Reply: DRS: "Re: ADO Brick Wall"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|