RE: DBI problem

2005-02-09 Thread Bob Showalter
mike wrote: > I have the following query which works in psql > > SELECT to_char('05 Feb 2005'::date,'-MM-DD') > > However when I run it in DBI I get > > $row6=$dbh->prepare("SELECT > to_char('2005-02-05'::date,'-MM-DD')"); > #$row6->bind_param(1,'2005-02-05'); $row6->execute(); > > > C

RE: DBI problem

2002-07-18 Thread nkuipers
Try reinstalling the module perhaps. Did you use automated installation or manual? Were there ANY problems with the install. Are you SURE you installed it to the appropriate directory structure for referencing? I work in 5.6.0 and use the DBI module bundled with it; are there bug reports fo

RE: DBI problem

2002-07-18 Thread Qingjuan Gu
Hi nathanael, I use perl5.6.1(symbolic link to perl) Makefile.PL, make, make test, make install to install DBI-1.29, I am attaching the results of installation. BTW, do you know how to install these modules. When I install Msql-Mysql-1.2219.tar.gz, there is failed message when I 'make test': #

Re: DBI problem

2002-07-18 Thread drieux
On Thursday, July 18, 2002, at 09:54 , Qingjuan Gu wrote: > Hi, > > In my perl-5.6.1, I installed DBI-1.29, when I run the perl script to > connect mysql database, the following error is given: > > Can't locate loadable object for module DBI in @INC (@INC contains: > /compbio/programs/perl-5.6

RE: DBI Problem

2002-12-31 Thread Bob Showalter
Michael Kramer wrote: > I can't > figure out how to Install any module is there some sort of trick? Read perldoc perlmodinstall (describes the "manual" way) perldoc CPAN (describes the "automated" way) Here's the same info on the web:

Re: DBI Problem

2004-02-27 Thread Wiggins d'Anconia
Jeremy Bush wrote: Hi, im using DBI to connect to a SQL database in order to serve dynamic content. Some people have reported to me that some fields are blank on my dynamic pages. It is as if the variable that is supposed to hold the data is being returned with no information it it. I have only

Re: DBI Problem

2004-02-27 Thread jeremy
Well I have a table if information with 3 columns being populated by perl variables drawn from an SQL database. The leftmost table will always get populated. the two right colums have a link in them. the anhcor tags always show up, but not the text for the link. The fields should never be blank,

Re: DBI Problem

2004-02-28 Thread R. Joseph Newton
Jeremy Bush wrote: > Hi, im using DBI to connect to a SQL database in order to serve dynamic > content. Some people have reported to me that some fields are blank on > my dynamic pages. It is as if the variable that is supposed to hold the > data is being returned with no information it it. I h

RE: DBI Problem

2004-02-28 Thread Jeremy Bush
Bush > Cc: [EMAIL PROTECTED] > Subject: Re: DBI Problem > > Jeremy Bush wrote: > > > Hi, im using DBI to connect to a SQL database in order to serve dynamic > > content. Some people have reported to me that some fields are blank on > > my dynamic pages. It

Re: DBI Problem

2004-02-28 Thread R. Joseph Newton
[EMAIL PROTECTED] wrote: > Well I have a table if information with 3 columns being populated by perl > variables drawn from an SQL database. The leftmost table will always get > populated. the two right colums have a link in them. the anhcor tags > always show up, but not the text for the link.

Re: DBI problem

2005-12-13 Thread Octavian Rasnita
Hi, As far as I know, the method fetchrow_hashref doesn't require a parameter (like fetchall_hashref). Teddy - Original Message - From: "john" <[EMAIL PROTECTED]> To: Sent: Tuesday, December 13, 2005 09:30 AM Subject: DBI problem > Hi all- > I'm attempting to loop thru an input file,

Re: DBI problem

2005-12-13 Thread Frank Bax
At 02:30 AM 12/13/05, john wrote: I'm attempting to loop thru an input file, executing a SELECT query with the value from each line. The script works for the first iteration, and then gives these error messages: DBD::mysql::st fetchrow_hashref failed: fetch() without execute() at ./describe_s

Re: DBI problem

2005-12-13 Thread john
Teddy, Yes, you're right. I changed this line: while ((my $ref) = $sth2 ->fetchrow_hashref("$num")) {... by removing the parameter, and quotes around 'my $ref' : while (my $ref = $sth2 ->fetchrow_hashref()) {... and the script works now. Thanks for your help. John Octavian Rasnita wrote:

Re: DBI problem

2005-12-13 Thread john
Frank, I can't see it in emacs. What do you mean by "dump the last line of the file in binary"? Sounds like something I need to learn about. John Frank Bax wrote: At 02:30 AM 12/13/05, john wrote: I'm attempting to loop thru an input file, executing a SELECT query with the value from each

RE: DBI problem

2005-12-14 Thread Charles K. Clarkson
john wrote: : I can't see it in emacs. : What do you mean by "dump the last line of the file in binary"? I don't use emacs, but if you open the file in a hex editor you can view each character and see how your lines and files end. HTH, Charles K. Clarkson -- Mob

Re: DBI problem

2005-12-14 Thread Frank Bax
At 11:07 PM 12/13/05, john wrote: I can't see it in emacs. Then my guess was off-base. What do you mean by "dump the last line of the file in binary"? Sounds like something I need to learn about. tail -2 filename | cat -v -v Displays non-printing characters so they are visible. --

RE: DBI problem

2005-12-14 Thread Charles K. Clarkson
john wrote: : Yes, you're right. I changed this line: : while ((my $ref) = $sth2 ->fetchrow_hashref("$num")) {... : by removing the parameter, and quotes around 'my $ref' : : while (my $ref = $sth2 ->fetchrow_hashref()) {... : and the script works now. For t

Re: DBI problem

2005-12-15 Thread john
Thanks, Charles, for your suggestions. I think I've incorporated most of them. Your regex is a lot more practical than what I was using. Here is the improved script. I can live with the one warning "Newline in left-justified string for printf at ./describe_skus.pl line 29". John #!/usr/bin/perl

RE: DBI problem

2005-12-16 Thread Charles K. Clarkson
john wrote: : Thanks, Charles, for your suggestions. I think I've incorporated : most of them. You're welcome. : Your regex is a lot more practical than what I was using. I wouldn't have used it a year ago. Perhaps I'm getting better. :) : Here is the impro

Re: DBI problem -- Fetch() without execute() error on trivial case.

2002-07-03 Thread Jenda Krynicky
From: [EMAIL PROTECTED] > As you can see, it *does* fetch and return the record I ask for. I > just don't understand why I'm getting error messages. > > Cheers, > Peter > > CODE: > > #!/usr/bin/perl -w > use DBI; > use strict; > > my $dbh = DBI->connect("DBI:mysql:ADA","root","p

Re: DBI problem -- Fetch() without execute() error on trivial case.

2002-07-03 Thread Felix Geerinckx
on Wed, 03 Jul 2002 18:55:25 GMT, <[EMAIL PROTECTED]> wrote: > I've been lurking for a few months and figured I'd pose a question > that I've been banging my head against for a while. (I've already told this in another thread today: Don't do this, it hurts :-) > If anyone can recommend a good

RE: DBI problem -- Fetch() without execute() error on trivial case.

2002-07-03 Thread vanHardenbergP
From: [EMAIL PROTECTED] > As you can see, it *does* fetch and return the record I ask for. I > just don't understand why I'm getting error messages. > > Cheers, > Peter > > CODE: > > #!/usr/bin/perl -w > use DBI; > use strict; > > my $dbh = DBI->connect("DBI:mysql:ADA","root","p

RE: DBI problem -- Fetch() without execute() error on trivial case.

2002-07-04 Thread vanHardenbergP
> > I've been lurking for a few months and figured I'd pose a question > > that I've been banging my head against for a while. > > (I've already told this in another thread today: > Don't do this, it hurts :-) How else am I going to get a break-through? > > > If anyone can recommend a good re