Bookmarks

Yahoo Gmail Google Facebook Delicious Twitter Reddit Stumpleupon Myspace Digg

Search queries

sqldatasource dal, wwwxxxenden, convert raid5 to raid 10 mdadm, apache force chunked, nrao wwwxxx, xxxxxdup, procmail change subject header, wwwXxx not20, Wwwxxx.doks sas, linux raid resync after reboot

Links

XODOX
Impressum

#1: problem with DBD::ADO

Posted on 2011-08-03 10:10:28 by 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] <http://www.perlmonks.org/?abspart=1;displaytype=displaycode;node_id=917939;part=1>

Any helps? Thanks in advance.

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

<span class=3D"Apple-style-span" style=3D"-webkit-border-horizontal-spacing=
: 2px; -webkit-border-vertical-spacing: 2px; font-family: &#39;Times New Ro=
man&#39;; font-size: medium; ">Hello,</span><span class=3D"Apple-style-span=
" style=3D"-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-=
spacing: 2px; font-family: &#39;Times New Roman&#39;; font-size: medium; ">=
<div class=3D"doctext">

<p>I&#39;ve used DBD::ADO module lately, but stuck at the beginning.=A0</p>=
<p>below =A0is test code:</p><pre class=3D"code" style=3D"white-space: pre-=
wrap; "><div class=3D"codeblock"><tt class=3D"codetext"><font size=3D"-1">
# use DBD::Oracle
use DBI;


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

print $sth-&gt;fetchrow_array; # no any problems!!


#use ADO instead=20

use DBI;


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

print $sth-&gt;fetchrow_array;


__OUTPUT__

DBD::ADO::st execute warning: Can&#39;t Execute Command &#39;SELECT sysdate=
FR<span class=3D"line-breaker">
<font color=3D"red">+</font></span>OM dual&#39;

Package : DBD::ADO::st
Filename : C:\strawberry\perl\site\lib/DBD/ADO.pm
Line : 1244
Description : Multiple-step operation completed with one or mo<span=
class=3D"line-breaker">
<font color=3D"red">+</font></span>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<span=
class=3D"line-breaker">
<font color=3D"red">+</font></span>ive. at te
st_ADO.pl line 11.
DBD::ADO::st fetchrow_array failed: Statement handle not marked as Act<span=
class=3D"line-breaker">
<font color=3D"red">+</font></span>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<span=
class=3D"line-breaker">
<font color=3D"red">+</font></span>8c) at test_ADO.pl line 6
&lt;- prepare(&#39;SELECT sysdate FROM dual&#39;)=3D ( DBI::st=3DHASH(0=
xcba1ac) )<span class=3D"line-breaker">
<font color=3D"red">+</font></span> [1 items] at test_ADO.pl line 8
!! warn: 0 &#39;Can&#39;t Execute Command &#39;SELECT sysdate FROM dual=
&#39;

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


</font></tt></div><font size=3D"-1"><div class=3D"embed-code-dl" style=3D"t=
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; ">

<a href=3D"http://www.perlmonks.org/?abspart=3D1;displaytype=3Ddisplaycode;=
node_id=3D917939;part=3D1" style=3D"font-size: smaller; color: rgb(0, 0, 10=
2); ">[download]</a></div></font></pre>Any helps? Thanks in advance.=A0</di=
v></span>

--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==--

Report this message