RE: Stupid newbie question?

2006-06-26 Thread Rutherdale, Will
June 2006 07:29 > To: dbi-users@perl.org > Subject: Re: Stupid newbie question? > > > Your best bet (and fastest) would be to use > > fetchall_arrayref() > > like this > >my $sth = $dhh->prepare("select * from my_countries"); >$sth->e

Re: Stupid newbie question?

2006-06-26 Thread John Scoles
Your best bet (and fastest) would be to use fetchall_arrayref() like this my $sth = $dhh->prepare("select * from my_countries"); $sth->execute(); my $reff_array = $sth->fetchall_arrayref(); then you can use $ref_array anyway you want without going back to the DB. foreach my $row (@

Re: Stupid newbie question?

2006-06-23 Thread Martin J. Evans
Ben wrote: Hey guys, I'm very green at DBI stuff, so maybe this is a stupid question. But after going through the DBI man page and searching the web for a couple hours, I can't find the answer. All I'm looking to do is to walk the result set from a select statement more than once. Every exampl

RE: Stupid newbie question?

2006-06-23 Thread Reidy, Ron
Isn't this an ODBC thing? Did you look at the DBD::ODBC docs? -- Ron Reidy Lead DBA Array BioPharma, Inc. -Original Message- From: Ben [mailto:[EMAIL PROTECTED] Sent: Friday, June 23, 2006 1:48 PM To: dbi-users@perl.org Subject: Stupid newbie question? Hey guys, I'm very gr

Stupid newbie question?

2006-06-23 Thread Ben
Hey guys, I'm very green at DBI stuff, so maybe this is a stupid question. But after going through the DBI man page and searching the web for a couple hours, I can't find the answer. All I'm looking to do is to walk the result set from a select statement more than once. Every example I can find

Re: Newbie Question: DBI and MySQL Connection Issues

2005-03-24 Thread Ron Savage
On Thu, 24 Mar 2005 08:17:35 -0800 (PST), Qaseem Shaikh wrote: Hi Qaseem > Couldn't connect to database: Client does not support > authentication protocol requested by server; consider upgrading > MySQL client And when you googled for the error msg, it took you to this page, right? http://dev.

Newbie Question: DBI and MySQL Connection Issues

2005-03-24 Thread Qaseem Shaikh
Hi I am using DBI to connect to MySQL. However I am getting the following error: Couldn't connect to database: Client does not support authentication protocol requested by server; consider upgrading MySQL client when DBI tries to connect to the database. I've read about the solution which requi

[Fwd: Re: Newbie Question: (no error string)]

2004-06-17 Thread Elijah O. Alcantara
--- Begin Message --- Seems to be working now, with a little warning: Name "DBI::Errstr" used only once: possible typo at testing.pl line 11. Thanks! Elijah A. On Fri, 2004-06-18 at 14:23, Zhivko Duchev wrote: > On Friday 18 June 2004 08:04, Elijah O. Alcantara wrote: > > I don't get it, I foll

Re: Newbie Question: (no error string)

2004-06-17 Thread Zhivko Duchev
On Friday 18 June 2004 08:04, Elijah O. Alcantara wrote: > I don't get it, I followed the DBI examples from > http://www.saturn5.com/%7Ejwb/dbi-examples.html and got this error: > > $ perl testing.pl > > DBI connect('GovPH2','postgres',...) failed: (no error string) at > testing.pl line 7 > Databas

Newbie Question: (no error string)

2004-06-17 Thread Elijah O. Alcantara
I don't get it, I followed the DBI examples from http://www.saturn5.com/%7Ejwb/dbi-examples.html and got this error: $ perl testing.pl DBI connect('GovPH2','postgres',...) failed: (no error string) at testing.pl line 7 Database Connection failed!!!: ERROR: Missing '=' after 'GovPH2' in conninfo

Re: Newbie Question

2002-07-17 Thread Jeff Zucker
Dana Lucent wrote: > Currently, > I am receiving the error "Execution ERROR: Cannot open .\table: No such > file or directory at C:/PERL/site/lib/DBD/File.pm line 469. Do you have a file called "table" in your current working directory? If not, then you need to either use the name of the file

Newbie Question

2002-07-17 Thread Dana Lucent
Hello, I am trying to read two CSV files into arrays and compare those values for a data conversion project that I am on. While I am only addressing 1 CSV file for this example, I think that those with much more knowledge than I on PERL will see immediately where I am going wrong. Currently

RE: Newbie question concerning DBI

2002-07-09 Thread Felix Geerinckx
on Tue, 09 Jul 2002 14:05:51 GMT, [EMAIL PROTECTED] (Timothy Helck) wrote: > Generally I prefer to cat together my select statement as a > string, then use prepare(). Like this: > my $SQL_sth1 = q > { SELECT * > FROM coverage_primary_loan > WHERE certificate_nu

Re: Newbie question concerning DBI

2002-07-09 Thread Hardy Merrill
[EMAIL PROTECTED] [[EMAIL PROTECTED]] wrote: > Dana, > > Generally I prefer to cat together my select statement as a string, then use > prepare(). Like this: > my $SQL_sth1 = q Careful with this "q" - remember that a single quote will *NOT* allow interpolation of any perl variables($certif

RE: Newbie question concerning DBI

2002-07-09 Thread timothy . helck
everything you need to know about this great tool. Tim Helck -Original Message- From: Dana Lucent [mailto:[EMAIL PROTECTED]] Sent: Tuesday, July 09, 2002 9:41 AM To: [EMAIL PROTECTED] Subject: Newbie question concerning DBI Hello, I am currently attempting to read data from a text fi

Re: Newbie question concerning DBI

2002-07-09 Thread Jeff Seger
Ok, my best guess is that you have blank lines in your data file. You may be passing an empty string to your prepare statement. What is on line 16 of your datafile? Also, at what point do you set the value of $file? You need to execute and fetch the values from the first query into $file or y

Re: Newbie question concerning DBI

2002-07-09 Thread John Saylor
Hi Use placeholders Verify operations ( 02.07.09 06:40 -0700 ) Dana Lucent: > $datafile = "CERT.TXT"; > open(DATAFILE, $datafile); Should check for errors here. > chomp(@cert = ); Check @cert. I'm not sure you're using chomp correctly here [maybe]. Use and execute with variables later, for i

Newbie question concerning DBI

2002-07-09 Thread Dana Lucent
Hello, I am currently attempting to read data from a text file that contains 1 column of numbers, use each record that was read to query a database. However, (depending Upon how the code is written) I receive an error message that states that my SQL statement is contains an error. I am encl

getting a serial PK for an insert (newbie question)...

2002-06-03 Thread tomasz konefal
hello list, i'm still a bit fresh to this whole database thing, and i've got a question i'm hoping someone can help me with. i need to know what the primary key is for an insert into a table so that i can add another bit of data into another table which has a foreign key to this primary

Re: getting a serial PK for an insert (newbie question)...

2002-06-03 Thread Michael Peppler
On Mon, 2002-06-03 at 13:06, tomasz konefal wrote: >i need to know what the primary key is for an insert into a table so > that i can add another bit of data into another table which has a > foreign key to this primary table. this primary key is a serial number > that automatically increments

getting a serial PK for an insert (newbie question)...

2002-06-03 Thread tomasz konefal
hello list, my apologies if this turns out as a duplicate/repost. i'm still a bit fresh to this whole database thing, and i've got a question i'm hoping someone can help me with. i need to know what the primary key is for an insert into a table so that i can add another bit of data int

newbie question

2002-04-08 Thread Mace, Richard
Any help greatly appreciated! I'm running Perl 5.00503 on a Solaris 2.6 machine. I have Microsoft Access Databases that I wish to connect to, these live on the same UNIX machine. I've installed DBI-1.20 and have downloaded DBD::ODBC-0.28. I am getting a lot of conflicting advice on exactly what

newbie question: HP->SQL Server??

2002-03-17 Thread Adam Schwartz
Hi, I need to write a perl script that will run on HPUX 11, make a dbi connection to Microsoft SQL server running on W2000, and create a file on the HP using the rows I've retrieved. Can anyone help me out on this? I'm not sure what packages to install? Do I need to install some things on the W2

RE: newbie question

2001-05-06 Thread Sterin, Ilya
t: Sunday, May 06, 2001 4:30 PM To: [EMAIL PROTECTED] Subject: newbie question I'm using DBI and DBD::Pg. When I try and connect to the database, I get DBI->connect(dbname=tracker) failed: 1 at ./tracker2.pl line 15. Can someone tell me where the 1 is defined so I can see what it me

newbie question

2001-05-06 Thread Stephen M. Ford
I'm using DBI and DBD::Pg. When I try and connect to the database, I get DBI->connect(dbname=tracker) failed: 1 at ./tracker2.pl line 15. Can someone tell me where the 1 is defined so I can see what it means? On the postgres database, I've add the following line to the pg_hba.conf host

RE: newbie question to sysdate

2001-04-17 Thread Marco Wise
IL PROTECTED] > Subject: newbie question to sysdate > > > Hi, > I am new to this list and am looking for some help. I have tried > finding my > problem with perldoc DBI and the FAQ, but without luck... 8( > > I am trying to execute the following statement: > $que

Re: newbie question to sysdate

2001-04-17 Thread jmb
Thanks to everybody for the tips! As pointed out the problem was an undef handle. I forked before connecting and so the child didn't have the handle, while the parent's had it. Thanks again! Joachim On Tuesday 17 April 2001 16:11, you wrote: > Hi, > I am new to this list and am looking for so

Re: newbie question to sysdate

2001-04-17 Thread Ronald J Kimball
On Tue, Apr 17, 2001 at 04:11:53PM +0200, jmb wrote: > Hi, > I am new to this list and am looking for some help. I have tried finding my > problem with perldoc DBI and the FAQ, but without luck... 8( > > I am trying to execute the following statement: > $query = $dbhandle->prepare("select FAXID

newbie question to sysdate

2001-04-17 Thread jmb
Hi, I am new to this list and am looking for some help. I have tried finding my problem with perldoc DBI and the FAQ, but without luck... 8( I am trying to execute the following statement: $query = $dbhandle->prepare("select FAXID from GMX.FAX_DIR where PROCESSLEVEL=2 and (sysdate - LASTCHANGE)

[Fwd: Re: SQL newbie question ....] correction

2001-03-01 Thread Sean Cooper
Original Message From: Sean Cooper <[EMAIL PROTECTED]> Subject: Re: SQL newbie question To: "Sterin, Ilya" <[EMAIL PROTECTED]> CC: "'Mark Vandenbroeck '" <[EMAIL PROTECTED]>,"'[EMAIL PROTECTED] '" &l

Re: SQL newbie question ....

2001-03-01 Thread Sean Cooper
urn data. I know that seems king of amaturish, and a cople people have allready solved my problem -- I'm just curious now if there are other ways that I don't see to fix this. Thanks > > -Original Message- > From: Sean Cooper > To: Mark Vandenbroeck >

RE: SQL newbie question ....

2001-03-01 Thread Sterin, Ilya
Cooper To: Mark Vandenbroeck Cc: [EMAIL PROTECTED] Sent: 03/01/2001 4:59 PM Subject: Re: SQL newbie question Mark Vandenbroeck wrote: > Sean, > > It would help us help you if you could explain : > - what you expect this to do > - why you think it doesn't work (statement faili

Re: SQL newbie question ....

2001-03-01 Thread Tony Foiani
> "Sean" == Sean Cooper <[EMAIL PROTECTED]> writes: Sean> I have a group of records as keys of a hash. because I can't Sean> sort the values in the hash I'd like to use ORDER BY to sort the Sean> values after I've retrieved them: Depending on how many records you have in your hash, you can a

Re: SQL newbie question ....

2001-03-01 Thread Sean Cooper
"Thomas A. Lowery" wrote: Yes -- Too much coffee ... that works fine. Thanks ... > On Thu, Mar 01, 2001 at 06:59:37PM -0500, Sean Cooper wrote: > > I have a group of records as keys of a hash. because I can't sort the values in > > the hash > > I'd like to use ORDER BY to sort the values aft

Re: SQL newbie question ....

2001-03-01 Thread Thomas A . Lowery
On Thu, Mar 01, 2001 at 06:59:37PM -0500, Sean Cooper wrote: > I have a group of records as keys of a hash. because I can't sort the values in > the hash > I'd like to use ORDER BY to sort the values after I've retrieved them: > > > foreach $key (keys %include) { foreach $key (sort keys %includ

Re: SQL newbie question ....

2001-03-01 Thread Sean Cooper
ge - > From: "Sean Cooper" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Thursday, March 01, 2001 3:30 PM > Subject: SQL newbie question > > > Hello .. > > > > could somebody please explain why this doesn't work, and what I need

Re: SQL newbie question ....

2001-03-01 Thread Mark Vandenbroeck
OTECTED]> Sent: Thursday, March 01, 2001 3:30 PM Subject: SQL newbie question > Hello .. > > could somebody please explain why this doesn't work, and what I need to be doing > to get it to work like I think it should? > >$MDG_Updates_sth = $MDG_dh->prepare(qq{S

SQL newbie question ....

2001-03-01 Thread Sean Cooper
Hello .. could somebody please explain why this doesn't work, and what I need to be doing to get it to work like I think it should? $MDG_Updates_sth = $MDG_dh->prepare(qq{SELECT * FROM MDG_Updates WHERE update_key = ? ORDER BY update_key}); $MDG_Updates_sth->bind_param(1,qq{$key}); $MDG

Re: Newbie question - www user for Perl DBI

2001-02-08 Thread MikeBlezien
On Thu, 8 Feb 2001 10:23:52 -0600, "Joe Halbrook" <[EMAIL PROTECTED]> wrote: Joe, If your trying to execute via the browser, you must have the script produce some sort HTTP HEADER to display the results or something like that, otherwise when the script is finished, it doesn't know what else to

re: Newbie question - www user for Perl DBI

2001-02-08 Thread Joe Halbrook
Sorry, I didn't include the script code the first time: . . . $host = "$FORM{'host'}; $agent= "$ENV{'HTTP_USER_AGENT'}"; $remote = "$ENV{'REMOTE_ADDR'}"; $ref = "$ENV{'HTTP_REFERER'}"; my $database_name = $FORM{'owner'}; my $l

Newbie question - www user for Perl DBI

2001-02-08 Thread Joe Halbrook
Hate to ask a question that has surely been asked before, but can someone help. I run a simple DBI script from telnet to insert a row into a table. This works fine. When I call that script from a browser, it will not insert. I suspsected that the www user (nobody) needed insert access to th