Hello,
Your code is ok, but the SQL Command "SELECT TO SLIST 0 FORM CUSTOMERS;",
isn't generate a selectlist active. What is that ocurr?. This command don't
functio from VB.
Thanks.
-----Mensaje original-----
De: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
nombre de Brian Leach
Enviado el: lunes, 23 de febrero de 2004 16:08
Para: 'U2 Users Discussion List'
Asunto: RE: SQL with UniObject
C�sar
Here's a short bit of vbscript to illustrate.
Use Command object to execute any command.
If the command returns text, use the Command.Response to capture it.
If the command returns a select list, use the SelectList() collection with
ReadList I it is short, or ReadNext loop if it is long.
Regards,
Brian Leach
'---------------
Dim Sess
Dim Da
Set sess = CreateObject("UniObjects.UnioaifCtrl.1")
Set DA = CreateObject("UniObjects.UniDynArray")
Sess.HostName = "localhost"
Sess.AccountPath = "uv"
Sess.UserName = "your_username"
Sess.Password = "your_password"
Sess.Connect
If Sess.Error <> 0 Then
Msgbox "Bad connection"
Else
' This returns a select list
sess.Command.Text = "SELECT VOC"
Sess.Command.Exec
Set DA = Sess.SelectList(0).ReadList
Msgbox DA.StringValue
' this returns text
Sess.Command.Text = "SELECT * FROM VOC WHERE F1 LIKE 'F%';"
Sess.Command.Exec
Msgbox Sess.Command.Response
End If
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On Behalf Of Cesar Riba
> Sent: 23 February 2004 14:37
> To: [EMAIL PROTECTED]
> Subject: SQL with UniObject
>
> Hello,
>
> Can somebody can explain me how to build a soubroutine
> for executing SQL commands from Visual Basic and return of
> result in a UniDynArray.
>
> I need too insert sentences as like "SELECT TO SLIST 0
> FROM CUSTOMERS;"
>
> Thanks,
>
> C�sar Riba
>
> --
> u2-users mailing list
> [EMAIL PROTECTED]
> http://www.oliver.com/mailman/listinfo/u2-users
>
> ______________________________________________________________
> __________
> 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]
http://www.oliver.com/mailman/listinfo/u2-users
--
u2-users mailing list
[EMAIL PROTECTED]
http://www.oliver.com/mailman/listinfo/u2-users