Hi
You can simply instantiate an instance of uniobjects as an OleVariant using
CreateOleObject:
procedure TForm1.Button1Click(Sender: TObject);
Var
Sess : OleVariant;
Const
UNIOBJECTS_NAME = 'UniObjects.Unioaifctrl.1';
begin
Try
Sess := CreateOleObject(UNIOBJECTS_NAME);
Except
SHowMessage('Cannot create session');
exit;
End;
Sess.HostName := 'myserver';
Sess.UserName := 'root';
Sess.AccountPath := 'myaccount';
Sess.Password := 'mypassword';
Sess.Connect;
If Sess.Error > 0 then Begin
ShowMessage('Error connecting ' + IntToStr(Sess.Error));
Exit;
End;
Sess.Command.Text := 'WHO';
Sess.Command.Exec;
Showmessage(Sess.Command.Response);
End;
Brian
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of [EMAIL PROTECTED]
Sent: 20 July 2004 16:20
To: [EMAIL PROTECTED]
Subject: RE: [U2] looking for delphi components
>Is there anyone out there who know if there is some components= made
>to wrap uniobjects into delphi and where there are a component like=
>TDataSource ??
Delphi will import any Active X components fairly well. Check
http://www.drbob42.com for an article on writing your own custom data access
components. I considered it at one time, basically wrapping uniobjects'
functionality, but I decided it was not worth the effort for our small
project.
Hope it helps.
-------
u2-users mailing list
[EMAIL PROTECTED]
To unsubscribe please visit http://listserver.u2ug.org/
________________________________________________________________________
This email was checked by MessageLabs SkyScan before entering Microgen.
________________________________________________________________________
This email was checked on leaving Microgen for viruses, similar
malicious code and inappropriate content by MessageLabs SkyScan.
DISCLAIMER
This email and any attachments are confidential and may also be
privileged.
If you are not the named recipient, please notify the sender
immediately and do not disclose the contents to any other
person, use it for any purpose, or store or copy the information.
In the event of any technical difficulty with this email, please
contact the sender or [EMAIL PROTECTED]
Microgen Information Management Solutions
http://www.microgen.co.uk
-------
u2-users mailing list
[EMAIL PROTECTED]
To unsubscribe please visit http://listserver.u2ug.org/