Thread View: borland.public.cppbuilder.database.ado
1 messages
1 total messages
Started by Max B Shahab
Tue, 16 Jan 2001 17:55
r/w property of ADOConnection type in COM-object
Author: Max B Shahab
Date: Tue, 16 Jan 2001 17:55
Date: Tue, 16 Jan 2001 17:55
54 lines
2242 bytes
2242 bytes
I am writing an ActiveX library with ASP object (Delphi 5). In my COM-object
interface I need
to have the r/w property with type of ADO Connection (I want to transmit an
already
established in ASP page ADO Connection to my COM object, for example:
<%
Set myConn=server.CreateObject("ADODB.connection")
myConn.Open
Set DelphiASPObj = Server.CreateObject("DBUpload.Upload")
DelphiASPObj.ADOConn = myConn
...
%>
).
First, I used an Microsoft ActiveX Data Objects 2.1 Library in Type Library
Editor.
Second, I declared the r/w property in interface:
[propget, id(0x00000003)]
HRESULT _stdcall ADOConn([out, retval] _Connection ** Value );
[propput, id(0x00000003)]
HRESULT _stdcall ADOConn([in] _Connection * Value );
This is a part of source code below:
...
function Get_ADOConn: _Connection; safecall;
procedure Set_ADOConn(const Value: _Connection); safecall;
...
function TUpload.Get_ADOConn: _Connection;
begin
result := dmDB.cnDB.ConnectionObject As Connection;
end;
...
procedure TUpload.Set_ADOConn(const Value: _Connection);
begin
dmDB.cnDB.ConnectionObject := Value; //row 65
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
end;
[Error] Upload.pas(65): Incompatible types: 'ADODB_TLB._Connection' and
'ADOInt._Connection'
How must I assign a Value ? Where did I mistake ? And am I whether correct
generally write?
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads