Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

problem about DBD::ADO

by xiaoyafeng (Chaplain)
on Aug 01, 2011 at 23:51 UTC ( #917939=perlquestion: print w/ replies, xml ) Need Help??
xiaoyafeng has asked for the wisdom of the Perl Monks concerning the following question:

Hi monks,

I've had to use DBD::ADO module for so called persistence with colleagues, but stuck at the beginning. ;) take a look below 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
Any helps? Thanks in advance. </code>




I am trying to improve my English skills, if you see a mistake please feel free to reply or /msg me a correction

Comment on problem about DBD::ADO
Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://917939]
Approved by ww
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (16)
As of 2015-07-29 14:23 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (263 votes), past polls