> Hi,
> 
> I am trying to write a script that copies an information from 
> ACCESS but
> it gives me the following error:
> 
> Can't call method "Sql" on an undefined value at 
> franowner.pl.txt line 4.
> 
> Here's the script:
> 
> 
> use Win32::ODBC;
> $DSN="db1";
> $db = new Win32::ODBC("db1");

you should check if $db is defined, otherwise there has been an error

die "Error: " . Win32::OLE->LastError if  !$db;


> $db->Sql("SELECT owner_first_name, owner_last_name FROM Owners WHERE
> ID=11");
> if ($db->Error()) {
> print "Error: $db->Error";
> }
> statement:\n$DBI:errstr\n";
> ($ownerfname,$ownerlname) = $db->FetchRow();
> print "Database results: first name $ownerfname and last name
> $ownerlname\n";
> $db->finish;
> $db->disconnect || die "Cannot disconnect from database";
> 
> Please, help me with this problem.
> ____________________________________________________
> Какво е реклама в Интернет? - http://reklama.mail.bg
> 
> 
> --
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 
> 
> -- 
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to