This is great Kevin. There is a whole new world to explore

Regards,
Jeff Marcos

This e-mail is for the use of the intended recipient(s) only. If you
have received in error, please notify the sender immediately and delete
it. If you are not the intended recipient, you must not use, disclose or
distribute this e-mail without the author's prior permission. Corporate
Express checks all outgoing mail and accepts no liability for any loss
or damage caused by software viruses.


-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Kevin Sproule
Sent: Thursday, 4 May 2006 12:24 AM
To: [email protected]
Subject: RE: [U2] UniVerse + PERL

You can also use Win32::OLE to connect to UV.  This script counts the
VOC:



#!/perl/bin/perl.exe -w

use Win32::OLE;

my ($err, $result, $cmd);



use constant UV_SESSION_OBJECT => 'UniObjects.unioaifctrl'; # name of
UniObject session object



$uv = Win32::OLE->new(UV_SESSION_OBJECT) or die "Cannot get session
object: $!\n";



$uv->LetProperty('UserName',    'kevin');

$uv->LetProperty('Password',    'password');

$uv->LetProperty('HostName',    '192.168.246.139');

$uv->LetProperty('AccountPath', 'KEVIN');

$uv->Connect;  # open connection to sever



if (! $uv->IsActive) { # check status

   print "Not Connected: $uv->{Error}\n";

   exit;

}



print "Connected\n";



$cmd = 'COUNT VOC';

$uv->Command->LetProperty('Text', $cmd);

$uv->Command->Exec;

$err = $uv->Command->{'CommandStatus'};

print $uv->Command->{'Response'};



$uv->Disconnect;  # close connection to server





> Date: Tue, 2 May 2006 18:35:48 +0800

> From: "Ang Suan Yong" <[EMAIL PROTECTED]>

> Subject: [U2] UniVerse + PERL

>

> Dear All

> Is it possible to use Perl connect to UniVerse backend  to run some UV
Command , like CREATE FILE , SELECT FILE?

> Current im trying using DBD::ODBC , the uv connection is find but
statement execution failed . any idea ??

>

> use DBD::ODBC;

> my $db = DBI->connect('dbi:ODBC:UVSOURCE',"userid","password") ||
die("Connection failed") ;

> my $cmd="SELECT * FROM VOC;" ;

> my $stmt= $db->prepare($cmd);

>

> Error Shown as below :

>

> DBD::ODBC::db prepare failed: [IBM][UVODBC][2700828] Error ID = 23 ,

> Severity: ERROR Facility: DBCAPERR - Line 1, column 15 (around "VOC"):

> SQL statement referenced a nonexistent table or view.

>

> Thanks & Regards











Kevin Sproule

Sr. Technical Consultant

AFS Technologies, Inc.

2141 E. Highland Ave.

Suite 100

Phoenix, AZ 85016

Office 602-522-8181 | Mobile 602-549-0470 | Email [EMAIL PROTECTED]
-------
u2-users mailing list
[email protected]
To unsubscribe please visit http://listserver.u2ug.org/
-------
u2-users mailing list
[email protected]
To unsubscribe please visit http://listserver.u2ug.org/

Reply via email to