problem with DBD::ADO

problem with DBD::ADO

am 03.08.2011 10:10:28 von Xiao Yafeng

--===============0451825132==
Content-Type: multipart/alternative; boundary=20cf307ca03ee135f204a99566f0

--20cf307ca03ee135f204a99566f0
Content-Type: text/plain; charset=ISO-8859-1

Hello,

I've used DBD::ADO module lately, but stuck at the beginning.

below is test code:


# use DBD::Oracle
use DBI;


my $dbh = DBI->connect("dbi:Oracle:adas", 'adas', 'adas', {
"RaiseErro+r" => 1 } ) or die $DBI::errstr;
#my $dbh = DBI->connect("dbi:ADO:Provider=OraOLEDB.Oracle;Data
Source=+adas;", 'adas', 'adas', { "RaiseError" => 1 } ) or die
$DBI::errstr;
#DBI->trace(1, 'dbitrace.log');
my $sql = "SELECT sysdate FROM dual";
my $sth = $dbh->prepare( $sql );
$sth->execute();

print $sth->fetchrow_array; # no any problems!!


#use ADO instead

use DBI;


#my $dbh = DBI->connect("dbi:Oracle:adas", 'adas', 'adas', {
"RaiseErr+or" => 1 } ) or die $DBI::errstr;
my $dbh = DBI->connect("dbi:ADO:Provider=OraOLEDB.Oracle;Data
Source=a+das;", 'adas', 'adas', { "RaiseError" => 1 } ) or die
$DBI::errstr;
DBI->trace(1, 'dbitrace.log');
my $sql = "SELECT sysdate FROM dual";
my $sth = $dbh->prepare( $sql );
$sth->execute();

print $sth->fetchrow_array;


__OUTPUT__

DBD::ADO::st execute warning: Can't Execute Command 'SELECT sysdate FR+OM dual'

Package : DBD::ADO::st
Filename : C:\strawberry\perl\site\lib/DBD/ADO.pm
Line : 1244
Description : Multiple-step operation completed with one or
mo+re errors.
Check each status value.
HelpContext :
HelpFile :
NativeError :
Number : 265946
Source : OraOLEDB
SQLState :
at test_ADO.pl line 9.
DBD::ADO::st fetchrow_array failed: Statement handle not marked as
Act+ive. at te
st_ADO.pl line 11.
DBD::ADO::st fetchrow_array failed: Statement handle not marked as
Act+ive. at te
st_ADO.pl line 11.

__dbitrace.log__

DBI 1.616-ithread default trace level set to 0x0/1 (pid 4504 pi
3e3e+8c) at test_ADO.pl line 6
<- prepare('SELECT sysdate FROM dual')= ( DBI::st=HASH(0xcba1ac)
)+ [1 items] at test_ADO.pl line 8
!! warn: 0 'Can't Execute Command 'SELECT sysdate FROM dual'

Package : DBD::ADO::st
Filename : C:\strawberry\perl\site\lib/DBD/ADO.pm
Line : 1244
Description : Multiple-step operation completed with one or
mo+re errors. Check each status value.
HelpContext :
HelpFile :
NativeError :
Number : 265946
Source : OraOLEDB
SQLState :
' (err#0)
<- execute= ( undef ) [1 items] at test_ADO.pl line 9
!! warn: 0 CLEARED by call to fetchrow_array method
!! ERROR: -900 'Statement handle not marked as Active.' (err#1)
<- fetchrow_array= ( ) [0 items] row-1 at test_ADO.pl line 11
ERROR: -900 'Statement handle not marked as Active.' (err#1)
<- DESTROY(DBI::st=HASH(0xcba1bc))= ( undef ) [1 items] at
test_AD+O.pl line 11
ERROR: -900 'Statement handle not marked as Active.' (err#0)
<- FETCH('Active')= ( 1 ) [1 items] at ADO.pm line 996
!! ERROR: -900 CLEARED by call to disconnect method
<- disconnect= ( 1 ) [1 items] at ADO.pm line 996
<- DESTROY(DBI::db=HASH(0xcb9c9c))= ( undef ) [1 items] at
test_AD+O.pl line 11
!! ERROR: -900 CLEARED by call to disconnect_all method
<- disconnect_all= ( ) [0 items] (not implemented) at DBI.pm line +744
! <- DESTROY(DBI::dr=HASH(0xcb966c))= ( undef ) [1 items] during
glo+bal destruction


[download]

Any helps? Thanks in advance.

--20cf307ca03ee135f204a99566f0
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

: 2px; -webkit-border-vertical-spacing: 2px; font-family: 'Times New Ro=
man'; font-size: medium; ">Hello,
" style=3D"-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-=
spacing: 2px; font-family: 'Times New Roman'; font-size: medium; ">=



I've used DBD::ADO module lately, but stuck at the beginning.=A0

=

below =A0is test code:

wrap; ">

# use DBD::Oracle
use DBI;


my $dbh =3D DBI->connect("dbi:Oracle:adas", 'adas', &#=
39;adas', { "RaiseErro
+
r" =3D> 1 } ) or die $DBI::errst=
r;
#my $dbh =3D DBI->connect("dbi:ADO:Provider=3DOraOLEDB.Oracle;Data =
Source=3D
+
adas;", 'adas', 'adas&#=
39;, { "RaiseError" =3D> 1 } ) or die $DBI::errstr;
#DBI->trace(1, 'dbitrace.log');
my $sql =3D "SELECT sysdate FROM dual";
my $sth =3D $dbh->prepare( $sql );=20
$sth->execute();

print $sth->fetchrow_array; # no any problems!!


#use ADO instead=20

use DBI;


#my $dbh =3D DBI->connect("dbi:Oracle:adas", 'adas', &=
#39;adas', { "RaiseErr
+
or" =3D> 1 } ) or die $DBI::errs=
tr;
my $dbh =3D DBI->connect("dbi:ADO:Provider=3DOraOLEDB.Oracle;Data S=
ource=3Da
+
das;", 'adas', 'adas=
9;, { "RaiseError" =3D> 1 } ) or die $DBI::errstr;
DBI->trace(1, 'dbitrace.log');
my $sql =3D "SELECT sysdate FROM dual";
my $sth =3D $dbh->prepare( $sql );=20
$sth->execute();

print $sth->fetchrow_array;


__OUTPUT__

DBD::ADO::st execute warning: Can't Execute Command 'SELECT sysdate=
FR
+
OM dual'

Package : DBD::ADO::st
Filename : C:\strawberry\perl\site\lib/DBD/ADO.pm
Line : 1244
Description : Multiple-step operation completed with one or mo class=3D"line-breaker">
+re errors.
Check each status value.
HelpContext :
HelpFile :
NativeError :
Number : 265946
Source : OraOLEDB
SQLState :
at test_ADO.pl line 9.
DBD::ADO::st fetchrow_array failed: Statement handle not marked as Act class=3D"line-breaker">
+ive. at te
st_ADO.pl line 11.
DBD::ADO::st fetchrow_array failed: Statement handle not marked as Act class=3D"line-breaker">
+ive. at te
st_ADO.pl line 11.

__dbitrace.log__

DBI 1.616-ithread default trace level set to 0x0/1 (pid 4504 pi 3e3e class=3D"line-breaker">
+8c) at test_ADO.pl line 6
<- prepare('SELECT sysdate FROM dual')=3D ( DBI::st=3DHASH(0=
xcba1ac) )
+
[1 items] at test_ADO.pl line 8
!! warn: 0 'Can't Execute Command 'SELECT sysdate FROM dual=
'

Package : DBD::ADO::st
Filename : C:\strawberry\perl\site\lib/DBD/ADO.pm
Line : 1244
Description : Multiple-step operation completed with one or mo class=3D"line-breaker">
+re errors. Check each status value.
HelpContext :=20
HelpFile :=20
NativeError :=20
Number : 265946
Source : OraOLEDB
SQLState :=20
' (err#0)
<- execute=3D ( undef ) [1 items] at test_ADO.pl line 9
!! warn: 0 CLEARED by call to fetchrow_array method
!! ERROR: -900 'Statement handle not marked as Active.' (err#1)
<- fetchrow_array=3D ( ) [0 items] row-1 at test_ADO.pl line 11
ERROR: -900 'Statement handle not marked as Active.' (err#1)
<- DESTROY(DBI::st=3DHASH(0xcba1bc))=3D ( undef ) [1 items] at test_=
AD
+
O.pl line 11
ERROR: -900 'Statement handle not marked as Active.' (err#0)
<- FETCH('Active')=3D ( 1 ) [1 items] at ADO.pm line 996
!! ERROR: -900 CLEARED by call to disconnect method
<- disconnect=3D ( 1 ) [1 items] at ADO.pm line 996
<- DESTROY(DBI::db=3DHASH(0xcb9c9c))=3D ( undef ) [1 items] at test_=
AD
+
O.pl line 11
!! ERROR: -900 CLEARED by call to disconnect_all method
<- disconnect_all=3D ( ) [0 items] (not implemented) at DBI.pm line =

+
744
! <- DESTROY(DBI::dr=3DHASH(0xcb966c))=3D ( undef ) [1 items] during g=
lo
+
bal destruction


ext-align: left; display: block; padding-top: 0px; padding-right: 0px; padd=
ing-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; mar=
gin-bottom: 0px; margin-left: 0px; ">

node_id=3D917939;part=3D1" style=3D"font-size: smaller; color: rgb(0, 0, 10=
2); ">[download]
Any helps? Thanks in advance.=A0 v>

--20cf307ca03ee135f204a99566f0--

--===============0451825132==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
ActivePerl mailing list
ActivePerl@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
--===============0451825132==--