G
Geek
Is there any way to trap for errors in the "->Open" statements below?
Thanks.
$Conn_ADO = Win32::OLE->new("ADODB.Connection");
$RS_ADO = Win32::OLE->new("ADODB.Recordset");
$DSN_ADO = "Provider=SQLOLEDB.1;Persist Security
Info=False;Database=DB1;Data Source=duh;UID=whatever;PWD=noway;Connect
Timeout=30";
$Conn_ADO->Open($DSN_ADO); #<-- *** This one ***
$SQL_ADO = <<EOF;
SELECT *
FROM TaskOrder
ORDER BY TaskID
EOF
$RS_ADO->Open($SQL_ADO, $Conn_ADO, 1, 1) #<-- *** And this one ***
Thanks.
$Conn_ADO = Win32::OLE->new("ADODB.Connection");
$RS_ADO = Win32::OLE->new("ADODB.Recordset");
$DSN_ADO = "Provider=SQLOLEDB.1;Persist Security
Info=False;Database=DB1;Data Source=duh;UID=whatever;PWD=noway;Connect
Timeout=30";
$Conn_ADO->Open($DSN_ADO); #<-- *** This one ***
$SQL_ADO = <<EOF;
SELECT *
FROM TaskOrder
ORDER BY TaskID
EOF
$RS_ADO->Open($SQL_ADO, $Conn_ADO, 1, 1) #<-- *** And this one ***