Hi, Paul,
I had a similar problem but determined it is not (or at least, mine was
not) a DBI or DBD::mysql issue.
I did find the cause, in my case. I'm not sure how this could happen
and why it would only affect one item out of thousands, but there was
"corruption" in the database itself (I
Did you find a solution to this problem? Cos I'm having the same difficulties.
t we just can't do
fetch on it? how is it possible?
and the thing is that it works fine at the beginning under mod_perl
(Catalyst code) after restart Apache but suddenly full of errors, and
all are fetchrow_array, selectrow_array (not DBIx::Class)
any thoughts?
Thanks
On 2011/1/13 16:4
have some
encoding issue with our Catalyst application.
then we upgraded the Perl to 5.10.1 and re-build the mod_perl 2.0.4
but in the new server, we keeping getting
DBD::mysql::st fetchrow_array failed: fetch() without execute()
or
DBD::mysql::db selectrow_array failed: fetch() without
1 and re-build the mod_perl 2.0.4
but in the new server, we keeping getting
DBD::mysql::st fetchrow_array failed: fetch() without execute()
or
DBD::mysql::db selectrow_array failed: fetch() without execute()
we have several MySQL servers and all the errors happens with
5.1.39-community-log
-BEGIN PGP SIGNED MESSAGE-
Hash: RIPEMD160
> I am working with Red Hat Enterprise Linux ES release 4 (Nahant
> Update 3) Linux and
> psql (PostgreSQL) 7.4.8 version and perl v5.8.5 version.
Based on the old versions of the above, I would guess that you are
using old versions of DBI
at it is hanging in the
statement
DB<1>s
main::LoadTableDetails(test.pl:19):
19: while ( @row = $sth->fetchrow_array )
20: {
DB<1>s
main::LoadTableDetails(test.pl:21):
21: printf "@row\n";
DB<1>s
186724 1
Please find the attached
ot;new"
> software, so I'm afraid that I'm stuck with these versions.
> So far so good. The issue is that at the end of each query, after that
> last record has been fetched, I get the following warning:
>
> DBD::Oracle::st fetchrow_array warning: (err=0, err
of each query, after that
last record has been fetched, I get the following warning:
DBD::Oracle::st fetchrow_array warning: (err=0, errstr=undef,
state=undef) at C:\.pl line .
Then at the very end of the script, even after the disconnect, I get:
(in cleanup) Can't call method &quo
052s avg (first 0.000633s,
> > min 0.10s, max 0.005775s)
> >
> > 'prepare' => 0.000216s
> > 'execute' => 0.027413s
> > 'fetchrow_array' => 0.789209s / 15319 = 0.52s avg (first 0.001905s, min
> > 0.25s, max 0.010331s)
>
>
;m more interested because DBI Profiling isolates the cost better.
> 'execute' => 0.249191s
> 'prepare' => 0.000489s
> 'fetchrow_arrayref' => 0.800888s / 15319 = 0.52s avg (first 0.000633s,
> min 0.10s, max 0.005775s)
>
> 'prep
> Connection is to a MSSQL Server using DBI:sybase.
>
> queries are the same, difference is one uses fetchrow_array() and the
> other uses fetchrow_arrayref().
>
> Supposedly, fetrow_arrayref() is faster than the other but doesn't seem
> that way.
> (this is per Tim Bu
On Fri, 2007-09-07 at 14:33 +0800, Ow Mun Heng wrote:
> Connection is to a MSSQL Server using DBI:sybase.
>
> queries are the same, difference is one uses fetchrow_array() and the
> other uses fetchrow_arrayref().
>
> Supposedly, fetrow_arrayref() is faster than the othe
Connection is to a MSSQL Server using DBI:sybase.
queries are the same, difference is one uses fetchrow_array() and the
other uses fetchrow_arrayref().
Supposedly, fetrow_arrayref() is faster than the other but doesn't seem
that way.
(this is per Tim Bunce - Advanced DBI Tutorial July
Please try issuing another fetchrow_array, if the $sth->err is
SQL-01S01, just to see. It could be that you can safely 'ignore' this
error and use it as a warning.
Jeff
From: Yongming Xu [mailto:[EMAIL PROTECTED]
Sent: Monday, December
CTED]
Subject: DBD-ODBC-1.13 --FOXPRO fetchrow_array question
Hello Jeff,
I am using the ODBC DBI to access FOXPRO (visual foxpro 6) tables.
Somehow
in one table some numberical fields mix numerical data with string like
"***,***,***". The fetchrow_array method will fail on that row
ie "error: dirname \"$dirname\" not found in the directory
table.\n";
return;
}
my $rc = $select_handle->rows;
print "row count=$rc\n";
@DBI::data = $select_handle->fetchrow_array();
The call fetchrow_array() results in a segmentat
that MySQL distinguishes between user 'fred'
connecting locally and user 'fred' connecting from a remote location.
Rgds, GStC.
-Original Message-
From: Ron Wingfield [mailto:[EMAIL PROTECTED]
Sent: Wednesday, December 29, 2004 1:08 PM
To: [email protected]
Subject: P
rks:
>
> mysql> SHOW DATABASES;
> +---+
> | Database |
> +---+
> | cookbook |
> | test |
> +---+
> 2 rows in set (0.00 sec)
>
> As you can see, there are two databases on my server, "cookbook" and "test&q
. Notice that there is no
"while" loop, but rather three simple calls to fetchrow_array( ).
a.. The first returns the last database in the known world as a row.
b.. The second call as expected, returns nothing in $db_name; subsequently, a
NULL (or blank value) is pushed onto the
The relevant line in an app I support says:-
while (my @row = $sth->fetchrow_array) { blah } # Note @ not $, also no
operands.
I am no Perl expert, but I think you may have one of those differences
arising from "context".
Rgds, GStC.
-Original Message-
From: Ron Wing
ABASES through the CGI. From the command
line, this works:
mysql> SHOW DATABASES;
+---+
| Database |
+---+
| cookbook |
| test |
+---+
2 rows in set (0.00 sec)
As you can see, there are two databases on my server, "cookbook" and
"test". I prepare the
prepare the query request, and execute it without any error complaints. The
while/fetchrow_array returns only one iteration or row, . . .apparently the
last row which contains the "test" database, and ultimately my popup list only
contains the "test" database row. I'm not
Thx for all the answers.
Well, you're right. I check for error against DB handle, not against
statement.
But that's just a typo. The statement itself works.
The problem is within the loop:
> while ( @row = $Statement->fetchrow_array ) {
>
628140
E: [EMAIL PROTECTED]
-Original Message-
From: Reidy, Ron [mailto:[EMAIL PROTECTED]
Sent: 01 December 2004 12:52
To: Hardy Merrill; [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: RE: fetchrow_array performance
I agree - set RasieError. But even more, it is impossible to tell what
ember 01, 2004 5:24 AM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: Re: fetchrow_array performance
Sorry for the top post - old version of Groupwise at work :-(
You aren't error checking your dbi statements - do you have RaiseError
set to "on" (1)? If you don't, check each
ned($Statement->errstr)) {
$Rollback=1;
warn $Statement->errstr;
}
if (defined($Statement->fetchrow_array)) {
$Rollback=1;
warn $TextOnResult;
my @row;
while ( @row = $Statement->fetchrow_
}
$Statement->execute();
if (defined($Statement->errstr)) {
$Rollback=1;
warn $Statement->errstr;
}
if (defined($Statement->fetchrow_array)) {
$Rollback=1;
warn $TextOnResult;
--
If you are fetching all the rows anyone one by one, why not just count
them as you go?
HTH.
Hardy Merrill
>>> Zhiliang Hu <[EMAIL PROTECTED]> 09/12/04 11:40AM >>>
Case:
When I used $query_a->fetchrow_array
I use it again in $query_a->rows to count numbe
Case:
When I used $query_a->fetchrow_array
I use it again in $query_a->rows to count number or rows.
However, when I used $query_a->fetchrow_arrayref
$query_a->rows returns nothing - it seems $query_a is nullified.
Is it normal or due to my other problem?
Thanks in advance!
Zhiliang
de that is causing the error looks like this:
if($searchFor eq "radioip") {
$sql = $dbh->prepare("SELECT CustNo FROM radio WHERE RadioIP = ?");
$sql->execute($searchString) or warn "Couldn't execute statement\n";
@row = $sql->fetchrow_array() or w
PROTECTED]'
> Subject: Re: Misunderstanding column_info/fetchrow_array
>
>
> Insert this line below the fetchrow_array:
>
> foreach (@info) { $_ = 'NULL' unless defined $_ }
> or
> defined($_) or $_ = 'NULL' foreach @info;
>
> t
Insert this line below the fetchrow_array:
foreach (@info) { $_ = 'NULL' unless defined $_ }
or
defined($_) or $_ = 'NULL' foreach @info;
take your pick.
Then go read the DBI docs about how NULLs are represented as undef values.
Tim.
On Tue, Feb 24, 2004
e warnings;
use DBI;
my $sth1 = $dbh->table_info();
while (my(@tab) = $sth1->fetchrow_array()) {
our @colNames;
I recommend putting that 'our' outside the loop, though it doesn't
appear to be causing any trouble. Why aren't you using 'my'?
@tabNames might be
gs;
use DBI;
my $sth1 = $dbh->table_info();
while (my(@tab) = $sth1->fetchrow_array()) {
our @colNames;
push @colNames, @tab[2];
}
open OUT, ">col.txt";
foreach $colName(@colNames) {
print OUT "$colName\n";
my $sth = $dbh
This was it...After the upgrade to 1.32_1, it now works normally.
Thanks for everyone's help,
dianne
> > You probably have a unknown (to DBD::Pg) column type in your
> > table. And
> > thereis a bug in 1.31 where an unknown column will cause a
> > null pointer
> > deref and your program will
> > I'm having a problem with the code below. The program exits when it
> > gets to the fetchrow_array() statement. It doesn't print an error
> > message and it doesn't die. We checked the temporary table, and it
> > exists with the right fields
On Tue, 17 Feb 2004, Dianne Yumul wrote:
> Date: Tue, 17 Feb 2004 15:45:17 -0800
> I'm having a problem with the code below. The program exits when it gets to
> the fetchrow_array() statement. It doesn't print an error message and it
> doesn't die. We checked
On Tue, Feb 17, 2004 at 05:13:09PM -0800, Dianne Yumul wrote:
> > >>> print STDERR "Got here 1.3\n";
> > >>>
> > >>> my @a = $sth_data->fetchrow_array() or die "fetchrow_array:
> > >>> $DBI::errstr\n";
> > &
> >>> print STDERR "Got here 1.3\n";
> >>>
> >>> my @a = $sth_data->fetchrow_array() or die "fetchrow_array:
> >>> $DBI::errstr\n";
> >>>
> >>> print STDERR "Got here 1.4\n";
>
> > So
On 02/17/2004 04:23 PM, Dianne Yumul wrote:
print STDERR "Got here 1.3\n";
my @a = $sth_data->fetchrow_array() or die "fetchrow_array:
$DBI::errstr\n";
print STDERR "Got here 1.4\n";
Sorry about the lack of version info, we're using DBI-1.40,
DBD-Pg-1.31,
> >print STDERR "Got here 1.3\n";
> >
> >my @a = $sth_data->fetchrow_array() or die "fetchrow_array:
> >$DBI::errstr\n";
> >
> >print STDERR "Got here 1.4\n";
> >
>
> What's in @?
The program ends on tha
Dianne Yumul wrote:
> Hello,
>
>
>
> I'm having a problem with the code below. The program exits when it gets to
> the fetchrow_array() statement. It doesn't print an error message and it
> doesn't die. We checked the temporary table, and it exists with t
Hello,
I'm having a problem with the code below. The program exits when it gets to
the fetchrow_array() statement. It doesn't print an error message and it
doesn't die. We checked the temporary table, and it exists with the right
fields. STDERR shows the "Got here 1
On Wed, 23 Jul 2003 07:53:50 -0700 Fuller Mark-acus10 <[EMAIL PROTECTED]> wrote:
> When I "fetchrow_array," a column that contains one space (' ') is
> returned to me as an undef. Is this the correct behavior?
>
> I am positive the column is one space. I ha
When I "fetchrow_array," a column that contains one space (' ') is returned to me as
an undef. Is this the correct behavior?
I am positive the column is one space. I have selected it using SQLPlus. "where x is
null" or "where x eq ''" returns
- Forwarded message from gmei <[EMAIL PROTECTED]> -
Delivered-To: [EMAIL PROTECTED]
From: "gmei" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Subject: RE: perl DBI question: fetchrow_array
Date: Fri, 7 Mar 2003 13:39:14 -0500
In-Reply-To: <[EMAIL PROTECT
If it won't be exactly 8 characters every time you need to change it to VARCHAR(8)
That will allow up to 8 characters but doesn't have to be exactly 8.
Dan
>
> Hello all,
>
> I am having a problem with prepared sth that uses
> fetchrow_array with two parameters pa
Hello all,
I am having a problem with prepared sth that uses fetchrow_array with two
parameters passed in.
The problem is as follows:
in one of my tables I have a column STAT_DEF_ID ( CHAR(8) ) which is also
one of the four unique constraints for that table. I am able to select my
rows into an
d the time to make up a script that used the benchmark module and then
did queries on the DB using all the methods (prepare, execute,fetchrow_array
and loop through with a while, fetchall_arrayref and loop through via a
foreach etc etc).
When going through the entire database the fetchall_arrayre
A bit of an aside here, but
> Is this really true??
>
> >> > #here is the problem area
> >> > while ($row = $sth->fetchrow_array()) {
> >>
> >> Here you are storing your fetchrow_array to a scalar, which
> >> means $row contains the
Nov 2002 05:02:16 -0800, "Ramon Hildreth" <[EMAIL PROTECTED]> wrote:
> >
> > So, for me the code below works fine:
> > while (my $val = $sth->fetchrow_array()) {
> > push @centers, $val;
> > }
> >
> > Hopefully I'm not m
On 2002-11-27 09:55:23 -0500, Paul Boutros wrote:
> On Wed, 27 Nov 2002 [EMAIL PROTECTED] wrote:
>
> > On Wed, 27 Nov 2002 05:02:16 -0800, "Ramon Hildreth" <[EMAIL PROTECTED]> wrote:
>
> So, for me the code below works fine:
> while (my $val = $sth->f
lem area
> > >> > while ($row = $sth->fetchrow_array()) {
> > >>
> > >> Here you are storing your fetchrow_array to a scalar, which
> > >> means $row contains the number of columns in the select (1), you
> > >> need to store it to an array:
&
On Wed, Nov 27, 2002 at 09:50:19AM -0500, Chris Faust wrote:
> Is this really true??
>
> >> > #here is the problem area
> >> > while ($row = $sth->fetchrow_array()) {
> >>
> >> Here you are storing your fetchrow_array to a scalar, which
> >
Interesting two posts with the same info, must be working correctly, sorry I didn't
test. I figured fetchrow_array always returned a list, it seems weird that it would do
anything else. Personally, for readability's sake only, I wouldn't want to call a
function called fetchrow
T group_center FROM places};
> > $sth = $dbh->prepare($stmt);
> > $sth->execute();
> >
> > #here is the problem area
> > while ($row = $sth->fetchrow_array()) {
>
> Here you are storing your fetchrow_array to a scalar, which means $row
> contains the n
Is this really true??
>> > #here is the problem area
>> > while ($row = $sth->fetchrow_array()) {
>>
>> Here you are storing your fetchrow_array to a scalar, which
>> means $row contains the number of columns in the select (1), you
>> need to store it
database (okay with this, it works)
> > >
> > > --
> > > my (@centers, $stmt, $sth, $row);
> > > $stmt = qq { SELECT group_center FROM places};
> > > $sth = $dbh->prepare($stmt);
> > > $sth->execute();
> > >
> >
e (okay with this, it works)
>
> --
> my (@centers, $stmt, $sth, $row);
> $stmt = qq { SELECT group_center FROM places};
> $sth = $dbh->prepare($stmt);
> $sth->execute();
>
> #here is the problem area
> while ($row = $sth->fetchrow_array()) {
> push @centers, $_;
>
T group_center FROM places};
> > $sth = $dbh->prepare($stmt);
> > $sth->execute();
> >
> > #here is the problem area
> > while ($row = $sth->fetchrow_array()) {
>
> Here you are storing your fetchrow_array to a scalar, which means $row contains the
>
se DBI;
> --
> connecting to database (okay with this, it works)
>
> --
> my (@centers, $stmt, $sth, $row);
> $stmt = qq { SELECT group_center FROM places};
> $sth = $dbh->prepare($stmt);
> $sth->execute();
>
> #here is the problem area
> while ($row = $sth->f
#here is the problem area
while ($row = $sth->fetchrow_array()) {
push @centers, $_;
}
foreach (@centers) {
print "$_\n";
}
I get a blank line for each line, where I would expect to see names of
groups from my query. ???
Thanks
Try $hostnames = $dbh->selectcol_arrayref("SELECT hostname FROM tblHost WHERE
status="started";)
Tim.
On Mon, Oct 07, 2002 at 11:58:07AM -0400, Janek Schleicher wrote:
> Chad Kellerman wrote:
>
> >Hi everyone,
> >
> > I thought $sth->fetchro
ach the
array of references to a 1-item array of hostnames.
Since you're going to loop on foreach, don't loop twice. (which is what
DBIx::Simple would probably do behind the scenes).
H.
On Mon, 7 Oct 2002, Janek Schleicher wrote:
> Chad Kellerman wrote:
>
> > Hi everyone,
>
Chad Kellerman wrote:
> Hi everyone,
>
>I thought $sth->fetchrow_array would do the trick but its not. I am
> using mysql on linux and I have a query:
>
> SELECT hostname FROM tblHost WHERE status="started";
>
> which returns a list of hostname
To: <[EMAIL PROTECTED]>
Sent: Thursday, October 03, 2002 12:59 PM
Subject: fetchrow_array
Hi everyone,
I thought $sth->fetchrow_array would do the trick but its not. I am
using mysql on linux and I have a query:
SELECT hostname FROM tblHost WHERE status="started";
which re
On Thu, Oct 03, 2002 at 03:59:48PM -0400, chad kellerman wrote:
> Hi everyone,
>
>I thought $sth->fetchrow_array would do the trick but its not. I am
> using mysql on linux and I have a query:
>
> SELECT hostname FROM tblHost WHERE status="started";
>
&
use selectrow_array() to fetch all at once.
Ilya
-Original Message-
From: chad kellerman
To: [EMAIL PROTECTED]
Sent: 10/3/02 1:59 PM
Subject: fetchrow_array
<>
Hi everyone,
I thought $sth->fetchrow_array would do the trick but its not. I am
using mysql on linux and I have a query:
SELECT hostname FROM tblHost WHERE status="started";
which returns a list of hostnames. I though the fetchrow_array would
return a array of hostnames bu
On Thu, Jun 13, 2002 at 03:16:29AM -0400, Philip M.Gollucci wrote:
> I need to write a wrapper function for calls to
> $sth->fetchrow_array() where the SELECT statement will return multiple
> rows.
>
> such that
>
> sub do_sql_array ($@) {
> # on initial call: $
on Thu, 13 Jun 2002 07:16:29 GMT, [EMAIL PROTECTED] (Philip M .
Gollucci) wrote:
> I need to write a wrapper function for calls to
> $sth->fetchrow_array() where the SELECT statement will return
> multiple rows.
>
> such that
>
> sub do_sql_array ($@) {
> # o
I need to write a wrapper function for calls to
$sth->fetchrow_array() where the SELECT statement will return multiple
rows.
such that
sub do_sql_array ($@) {
# on initial call: $sth = $dbh->prepare(); $sth->execute();
# on initial and subsequent until no more rows: retu
I am getting this error. What am I doing wrong ??
BEFORE: error=999return=TEST
AFTER: error=999 STH2= DBI::ProxyServer::st=HASH(0x28a420)
AFTER: STH1= DBI::db=HASH(0x1ca124)
Can't locate object method "fetchrow_array" via package
"DBI::ProxyServer::st&qu
On Sat, Feb 09, 2002 at 09:50:14AM +0100, Bodo Eing wrote:
> Ashwini,
>
> > hi,
> >
> > I have a perl script here which fetches data from the mysql database
> > using the fetchrow_array method. I have this script running on 2
> > different machines. unfortun
Ashwini,
> hi,
>
> I have a perl script here which fetches data from the mysql database
> using the fetchrow_array method. I have this script running on 2
> different machines. unfortunately this fetchrow_array call works on
> one machine and not on another. I used the rows
hi,
I have a perl script here which fetches data from the mysql database using the
fetchrow_array method. I have this script running on 2 different machines.
unfortunately this fetchrow_array call works on one machine and not on
another. I used the rows calls to check how many rows are
7; order by Time desc");
>
> line 71: while(my @Data=$sth->fetchrow_array) {
> ..
> }
>
> but when i run it, the following error message was
> displayed:
>
> Can't call method "fetchrow_array" without a package
> or subject reference at
Dear Sir/Madam,
I have the following coding:
line 70: my $sth=$dbh->do("select * from temp where
ID = '$Staff_ID' and Date = '$Date' and Time !=
'$Time' order by Time desc");
line 71: while(my @Data=$sth->fetchrow_array) {
..
}
but
TECTED]
Cc: DiGiovanni, Jim; DiGiovanni, Jim
Sent: 05/24/2001 8:33 AM
Subject: RE: Newbie Q. : fetchrow_array.
I only stated what I have seen and experienced. You can disagree, and
that
is ok. I made a suggestion for something to check, if it fixed the
problem
or not, it became one less thing that
have had
interesting challenges to overcome. By the way, Perl is 'C'. Check the
source code.
Michael
-Original Message-
From: Michael A Mayo [mailto:[EMAIL PROTECTED]]
Sent: Thursday, May 24, 2001 10:24 AM
To: [EMAIL PROTECTED]
Cc: DiGiovanni, Jim
Subject: Re: Newbie Q. : fetc
- Original Message -
From: "Sterin, Ilya" <[EMAIL PROTECTED]>
>> Well, that's not true. This is not C/C++ and an undefined value will
print
>> nothing with no error.
From: "Caraway, Michael" <[EMAIL PROTECTED]>
> I am running Oracle 8.0.5, Perl 5.005_03, DBI 1.14, and DBD Oracle 1.06 on
iginal Message -
From: "Caraway, Michael" <[EMAIL PROTECTED]>
To: "'Sterin, Ilya'" <[EMAIL PROTECTED]>; "Caraway, Michael"
<[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Cc: "DiGiovanni, Jim" <[EMAIL
---
From: Krung Saengpole [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, May 23, 2001 3:47 AM
To: [EMAIL PROTECTED]
Subject: Newbie Q. : fetchrow_array.
Hello all,
I just start to learn dbi and have a problem with it. I use dbi to
connect
to Access database and fetch the data to array 'til end
#x27;[EMAIL PROTECTED]' ';
'[EMAIL PROTECTED] '
Cc: DiGiovanni, Jim
Subject: RE: Newbie Q. : fetchrow_array.
Sensitivity: Personal
I am running Oracle 8.0.5, Perl 5.005_03, DBI 1.14, and DBD Oracle 1.06 on
Red Hat Linux 6.2 and that is how it works here. If you have a d
L PROTECTED]' '; '[EMAIL PROTECTED] '
Cc: 'DiGiovanni, Jim '
Subject: RE: Newbie Q. : fetchrow_array.
Well, that's not true. This is not C/C++ and an undefined value will print
nothing with no error.
Ilya Sterin
-Original Message-
From: Caraway, Michael
To:
Well, that's not true. This is not C/C++ and an undefined value will print
nothing with no error.
Ilya Sterin
-Original Message-
From: Caraway, Michael
To: '[EMAIL PROTECTED]'; [EMAIL PROTECTED]
Cc: DiGiovanni, Jim
Sent: 05/23/2001 6:39 AM
Subject: RE: Newbie Q. : fetchr
PROTECTED]]
Sent: Wednesday, May 23, 2001 3:47 AM
To: [EMAIL PROTECTED]
Subject: Newbie Q. : fetchrow_array.
Hello all,
I just start to learn dbi and have a problem with it. I use dbi to connect
to Access database and fetch the data to array 'til end of file.
But it only showed 2 lines of dat
g on. If you don't log in
as Admin, then you'll get permission errors on the tables.
"Krung Saengpole" <[EMAIL PROTECTED]> on 05/23/2001 03:46:56
AM
Please respond to [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
cc: (bcc: Wesley Sheldahl/Lex/Lexmark)
Subject: Newb
, May 23, 2001 at 02:46:56PM +0700, Krung Saengpole wrote:
> use DBI;
>
> $dbh = DBI->connect('dbi:ODBC:myDSN', '','');
> $sth = $dbh->prepare("Select * From TotalLevel")
or die/croak/call sub
or
if ($dbh-
= DBI->connect('dbi:ODBC:myDSN', '','');
$sth = $dbh->prepare("Select * From TotalLevel");
$sth->execute();
while (@data = $sth->fetchrow_array) {
foreach (@data){
print "$_ \t";
}
print "\n";
}
$sth->finish;
$dbh->disconnect;
Any help would be appreciated. Thank you in advance.
Krung
On Sun, May 13, 2001 at 02:17:48PM -0500, Dennis McCoy wrote:
> Illya:
>
> Thanks for asking. In process of putting together a set of code to
> demonstrate the problem, I found I was unable to re-create the problem. The
> single row comes back as expected.
>
> Must be something in my original sc
compare to my original script to help find
the problem on my end.
Thanks much,
Dennis
- Original Message -
From: "Sterin, Ilya" <[EMAIL PROTECTED]>
To: "Dennis McCoy" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Saturday, May 12, 2001 8:06 PM
Subje
Can't really help without seeing the code. Please post.
Ilya Sterin
-Original Message-
From: Dennis McCoy [mailto:[EMAIL PROTECTED]]
Sent: Saturday, May 12, 2001 6:14 PM
To: [EMAIL PROTECTED]
Subject: perl DBI method fetchrow_array() not returning query results
which contain a s
To whom it may concern:
I am using the perl DBI to query a remote Oracle 8 database. For most circumstances
everything works fine. However when I test using a query that results in one returned
row, method fetchrow_array() does not return the row. I know the row exists because I
feed the
Date sent: Thu, 01 Feb 2001 15:15:13 -0500
To: [EMAIL PROTECTED]
From: Kevin Sheen <[EMAIL PROTECTED]>
Subject: fetchrow_array() help
Kevin, you wrote
> if ($select) {
>
> $dbh = DBI->connect(
>>You are missing a '$' in your print statement, ie, it should be:
>>
>>print " $row[$i]";
>>
>>instead of:
>>print "$row[i]";
>>
>>
>>-Original Message-
>>From: Kevin Sheen [mailto:[EMAIL PROTECTED]]
&
You are missing a '$' in your print statement, ie, it should be:
print " $row[$i]";
instead of:
print "$row[i]";
-Original Message-
From: Kevin Sheen [mailto:[EMAIL PROTECTED]]
Sent: Thursday, February 01, 2001 12:15 PM
To: [EMAIL PROTECTED]
Subje
Try changing
$i<$col
to
$i<@row
Where is $col populated? What is in $select?
-Original Message-
From: Kevin Sheen [mailto:[EMAIL PROTECTED]]
Sent: Thursday, February 01, 2001 3:15 PM
To: [EMAIL PROTECTED]
Subject: fetchrow_array() help
if ($select) {
Note below: (are you using '-w' and 'use strict'?)
Regards,
dv
> -Original Message-
> From: Kevin Sheen [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, February 01, 2001 12:15 PM
> To: [EMAIL PROTECTED]
> Subject: fetchrow_array() help
>
>
1 - 100 of 101 matches
Mail list logo