Re: perl dbi question

2010-11-24 Thread Jim Gibson
At 12:31 PM -0800 11/24/10, Jim Green wrote: Hello Perl community, here is a question I encountered dbi and till now I use brute force to solve it, but I figured I may see better way to do it here. in orable sqlplus If I do select * from table, it will print out the results nicely, all aligned.

perl dbi question

2010-11-24 Thread Jim Green
Hello Perl community, here is a question I encountered dbi and till now I use brute force to solve it, but I figured I may see better way to do it here. in orable sqlplus If I do select * from table, it will print out the results nicely, all aligned. in dbi what I do now my $body = sprintf("mark

Re: Some DBI question -

2010-05-31 Thread John Scoles
On Sun, May 30, 2010 at 1:33 AM, newbie01 perl wrote: > Hi, > > Am trying out DBI for Oracle and just want to know if for example, I need > to > include column formatting stuff etc., is it best to just put them into a > .sql file and then execute the .sql file instead of placing them in the > Perl

Re: Some DBI question -

2010-05-30 Thread Chas. Owens
On Sun, May 30, 2010 at 01:33, newbie01 perl wrote: > Hi, > > Am trying out DBI for Oracle and just want to know if for example, I need to > include column formatting stuff etc., is it best to just put them into a > .sql file and then execute the .sql file instead of placing them in the Perl > DBI

Some DBI question -

2010-05-29 Thread newbie01 perl
Hi, Am trying out DBI for Oracle and just want to know if for example, I need to include column formatting stuff etc., is it best to just put them into a .sql file and then execute the .sql file instead of placing them in the Perl DBI script? Also, is there anyway to sort of "hide" the password s

Re: DBI question

2008-05-21 Thread Rob Dixon
Ken Foskey wrote: > On Wed, 2008-05-21 at 23:53 +1000, Ken Foskey wrote: >> I have a program that will run literally for days and days. It monitors >> logs by file tail. Problem is that I think the DBI is causing problems. >> It is constantly connecting and reconnecting to DB2 for every >> transa

Re: DBI question

2008-05-21 Thread Ken Foskey
On Wed, 2008-05-21 at 23:53 +1000, Ken Foskey wrote: > I have a program that will run literally for days and days. It monitors > logs by file tail. Problem is that I think the DBI is causing problems. > It is constantly connecting and reconnecting to DB2 for every > transaction. The original did

DBI question

2008-05-21 Thread Ken Foskey
I have a program that will run literally for days and days. It monitors logs by file tail. Problem is that I think the DBI is causing problems. It is constantly connecting and reconnecting to DB2 for every transaction. What I would like to do is block the subroutine and check the DBI connection

Re: Another simple DBI question: INSERT a NULL (MSODBC)?

2004-05-06 Thread Jenda Krynicky
From: "McMahon, Chris" <[EMAIL PROTECTED]> > Hello again... > I'm getting the hang of this, but now: > > $sql = qq{INSERT INTO table VALUES ($port,333,,,0); While you could use $sql = qq{INSERT INTO table VALUES ($port,333,NULL,NULL,0); you should not do it this way. First thing ... y

Re: SOLVED. RE: Another simple DBI question: INSERT a NULL (MSODBC)?

2004-05-06 Thread Dani Pardo
On Wed, 5 May 2004, McMahon, Chris wrote: > > Actually needs the text "NULL". "undef" doesn't work. Apologies-- I > hope somebody else needs this information someday. > > $sql = qq{INSERT INTO table VALUES ($port,333,,,0); $sth = Hi Chris, better/easier use this: $SQL="INSERT INTO table(fiel

SOLVED. RE: Another simple DBI question: INSERT a NULL (MSODBC)?

2004-05-06 Thread McMahon, Chris
Actually needs the text "NULL". "undef" doesn't work. Apologies-- I hope somebody else needs this information someday. -Chris -Original Message- From: McMahon, Chris Sent: Wednesday, May 05, 2004 2:23 PM To: [EMAIL PROTECTED] Subject: Another simp

Another simple DBI question: INSERT a NULL (MSODBC)?

2004-05-06 Thread McMahon, Chris
Hello again... I'm getting the hang of this, but now: $sql = qq{INSERT INTO table VALUES ($port,333,,,0); $sth = $dbh->prepare($sql) or die "Could not prepare $sql\n"; $sth->execute() or die "Could not execute $sql\n"; ...fails with "Incorrect syntax near ','" error, b

RE: Simple DBI question

2004-05-05 Thread Bob Showalter
McMahon, Chris wrote: > Can anyone suggest DBI syntax to capture the result of > > SELECT DISTINCT column1 FROM table WHERE column2= -1 > > into an array? Just a hint would help... my @results = $dbh->selectcol_array('select ...'); -- To unsubscribe, e-mail: [EMAIL PROTECTED] For

Re: Simple DBI question

2004-05-05 Thread Ashish Srivastava
Hi Chris, Try this: #!/usr/bin/perl # Purpose: Perl script for testing Oracle Database Connection # First setenvironmental variable BEGIN { # Comment ORACLE_HOME variable if running on window $ENV{ORACLE_HOME} = '/usr/orasys/8.1.7'; $ENV{TWO_TASK}= 'mydbname'; } use strict;

RE: Simple DBI question

2004-05-05 Thread B. Fongo
nt: Wednesday, May 05, 2004 12:46 AM ||> To: [EMAIL PROTECTED] ||> Subject: Simple DBI question ||> ||> ||> Hello... ||> My first DBI script was simply an inventory of columns in ||> tables. ||> Now I'm struggling with my second DBI script, and finding the ||>

Simple DBI question

2004-05-05 Thread McMahon, Chris
Hello... My first DBI script was simply an inventory of columns in tables. Now I'm struggling with my second DBI script, and finding the CPAN docs tough going. Can anyone suggest DBI syntax to capture the result of SELECT DISTINCT column1 FROM table WHERE column2= -1

DBI question

2004-01-28 Thread max4o
Hello, my simple question is, how can I get the seconds returned by the MySQL after some select, update or insert with DBI.pm package. Thanks - This mail is from: <[EMAIL PROTECTED]> - -- To unsubscribe, e-mail: [EMAIL PRO

Re: Another Bundle::DBI question

2002-05-25 Thread bob ackerman
On Saturday, May 25, 2002, at 12:00 PM, Phil Dobbin wrote: > On 25/5/02 at 11:46, [EMAIL PROTECTED] (bob ackerman) wrote: > >> >> On Saturday, May 25, 2002, at 11:41 AM, Phil Dobbin wrote: >> >>> I'm trying to install Bundle::DBI and CPAN gives me this error: >>> >>> Trying with "/usr/bin/ncft

Re: DBI question (again)

2001-08-02 Thread Robert Graham
L PROTECTED]>; <[EMAIL PROTECTED]> Sent: Thursday, August 02, 2001 10:15 AM Subject: Re: DBI question (again) > > > > good info on using the DBI module (should take you right to prepare): > > http://theoryx5.uwinnipeg.ca/CPAN/data/DBI/DBI.html#prepare > > > > Th

Re: DBI question (again)

2001-08-02 Thread Elie De Brauwer
> good info on using the DBI module (should take you right to prepare): > http://theoryx5.uwinnipeg.ca/CPAN/data/DBI/DBI.html#prepare > > There is also a good O'Reilly book titled "Using the Perl DBI" (or > something like that) by Alligator Descartes > I know of the existence of that book but t

Re: DBI question (again)

2001-08-02 Thread Ray Barker
>Extracted from the perl cookbook > >use DBI; > >$dbh = DBI->connect('DBI:driver:database', 'username', 'auth', >{ RaiseError => 1, AutoCommit => 1}); >$dbh->do($SQL); >$sth = $dbh->prepare($SQL); >$sth->execute(); >while (@row = $sth->fetchrow_array) { ># ... >} >$sth->finish();

DBI question (again)

2001-08-01 Thread Elie De Brauwer
Extracted from the perl cookbook use DBI; $dbh = DBI->connect('DBI:driver:database', 'username', 'auth', { RaiseError => 1, AutoCommit => 1}); $dbh->do($SQL); $sth = $dbh->prepare($SQL); $sth->execute(); while (@row = $sth->fetchrow_array) { # ... } $sth->finish(); $dbh->disconne

Re: DBI question ...

2001-07-31 Thread smoot
> Elie De Brauwer <[EMAIL PROTECTED]> said: > use DBI; > $dbh = BDI->connect('DBI:mysql:databasename:database:host','username','pass') > or die $DBI::errst; > > Now my problem is the following, in order to connect you have to know the > databasename but I want it to be that the users get a lis

RE: DBI question ...

2001-07-31 Thread Bob Showalter
> -Original Message- > From: Elie De Brauwer [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, July 31, 2001 9:16 AM > To: [EMAIL PROTECTED] > Subject: DBI question ... > > > Hello, > I have a little problem relating a program that I'm writing. > This pr

Re: DBI question

2001-07-31 Thread eDeveloper
t;[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, July 31, 2001 4:16 PM Subject: DBI question ... > Hello, > I have a little problem relating a program that I'm writing. This program > involves getting data from mysql databases. > > Acc

DBI question ...

2001-07-31 Thread Elie De Brauwer
Hello, I have a little problem relating a program that I'm writing. This program involves getting data from mysql databases. According to some docs the code should be like use DBI; $dbh = BDI->connect('DBI:mysql:databasename:database:host','username','pass') or die $DBI::errst; Now my problem

Re: Perl DBI question

2001-06-20 Thread Kolene Isbell
here > } > > There are several ways to get the variables into your script, but that is > one of the easiest. perldoc dbi gives some other nice examples, and just > monitoring the dbi users group will give you some other slick ideas. That is > just one of the easier ways

FW: Perl DBI question

2001-06-20 Thread Steve Howard
is just one of the easier ways to do it. Hope this helps Steve Howard -Original Message- From: Kolene Isbell [mailto:[EMAIL PROTECTED]] Sent: Wednesday, June 20, 2001 4:36 PM To: [EMAIL PROTECTED] Subject: Perl DBI question I'm trying to print out statistics on a web page, bas

Perl DBI question

2001-06-20 Thread Kolene Isbell
I'm trying to print out statistics on a web page, based on an evaluation form, where the person filling it out answers some questions with values 1-4. These are then stored in a MySQL database. I need to print out averages for each question, and throw out any zeros (which means they didn't selec