Newbie qurstion

2002-11-12 Thread Nicholas Marsh
Can I connect to a remote MS Access database with dbi? If so what's the port number? dbi:ODBC:dbName:hostname=host:port=' Thanks! nick marsh [EMAIL PROTECTED]

Re: bind_param (the endless saga of an attempt to use a list val in an SQL statement!

2002-11-12 Thread Michael A Chase
On 12 Nov 2002 16:33:47 -0800 Dana Lucent <[EMAIL PROTECTED]> wrote: > Presented here for the first time, is the aforementioned script: > # "#!/usr/bin/perl -w" and "use strict;" add very important error checking > my $source = "SFO400P1"; > my $dbh=DBI->connect("dbi:DB2:$source") or die; # I

bind_param (the endless saga of an attempt to use a list val in an SQL statement!

2002-11-12 Thread Dana Lucent
As I sit here contemplating my woes over a fresh Martini, I thought that I might post my problem in the hopes that those PERL guru's from on high would bestow a small perl (pun intended) of wisdom upon this poor individual. What is my plight you might ask? I am attempting to read a text file that

Re: how to fetch the result of a select count statement?

2002-11-12 Thread Tim Bunce
When you disconnect you'll probably get a warning about invalidating 1 active statement handle. Either call finish or use a $dbh->selectrow_* method - that's what they're there for. Tim. On Tue, Nov 12, 2002 at 03:28:53PM -0500, Hardy Merrill wrote: > Christopher G Tantalo [[EMAIL PROTECTED]] wr

Re: how to fetch the result of a select count statement?

2002-11-12 Thread Christopher G Tantalo
Hardy Merrill wrote: >### Need the parenthesis arround $total_rows here since >### we're using fetchrow_array. >my ($total_rows) = $sth->fetchrow_array() > > I didn't use a while loop here since you're only expecting > 1 row to be returned - that being the count. > -- > Hardy Merrill

Re: how to fetch the result of a select count statement?

2002-11-12 Thread Hardy Merrill
Christopher G Tantalo [[EMAIL PROTECTED]] wrote: > Stephane Legault wrote: > > > I do a lot of select in many statement and fetch the result on a array as > > needed. But now one of my staement is a "select count() from ...". How can > > I get the value of this statement? > > I do not know what d

Re: how to fetch the result of a select count statement?

2002-11-12 Thread Tim Bunce
Wow. That's a lot of code. Personally I'd just do: $count = $dbh->selectrow_array("select count(*) from ...") or die ...; (and the "or die" isn't needed if you're using RaiseError.) Tim. On Tue, Nov 12, 2002 at 01:01:21PM -0500, Vorce, Tim (T.) wrote: > Just like any other return from the d

Re: simple(?) quoting problem with DBD::mysql

2002-11-12 Thread Paul DuBois
At 20:19 + 11/12/02, Tim Bunce wrote: And the DBI has now defined a $dbh->quote_identifier method. But I'm not sure if DBD::mysql has implemented it yet. Tim. I don't believe so (which is why I didn't mention it). On Tue, Nov 12, 2002 at 12:48:29PM -0600, Paul DuBois wrote: At 10:27 -0

Re: simple(?) quoting problem with DBD::mysql

2002-11-12 Thread Tim Bunce
And the DBI has now defined a $dbh->quote_identifier method. But I'm not sure if DBD::mysql has implemented it yet. Tim. On Tue, Nov 12, 2002 at 12:48:29PM -0600, Paul DuBois wrote: > At 10:27 -0700 11/12/02, Rob Lee wrote: > >[Please respond directly to me as this address is not subscribed to th

DBD::Pg - bulk insert using "copy from STDIN" question

2002-11-12 Thread David Duff
has anyone had success using an sql command like "COPY foo FROM STDIN" and then using the func(, 'putline') command to send lines to the server? the pod file alludes to this capability, but i can't quite make it work. when i try to copy form STDIN, i get an error "no such file or directory". the

Re: simple(?) quoting problem with DBD::mysql

2002-11-12 Thread Paul DuBois
At 10:27 -0700 11/12/02, Rob Lee wrote: [Please respond directly to me as this address is not subscribed to this list - thnx] The problem is that parameter binding applies to data values, not to identifiers such as table or column names. When I parameter bind and execute() I get seemingly-sub

DBI installation problems for perl v5.6.0 and mysql v3.23.51

2002-11-12 Thread Samar Bakane
Hi, I am trying to install and configure on on Mac OSX v10.1.4 server the DBI drivers (DBI-1.18.tar.gz DBD::mysql) for interfacing perl v5.6.0 (default installation in Darwin) and mysql v3.23.51(installed by me ). I am folowing the instructions given in the readme file for DBI drivers. When I gi

DBI installation problems for perl v5.6.0 and mysql v3.23.51

2002-11-12 Thread Samar Bakane
Hi, I am trying to install and configure on on Mac OSX v10.1.4 server the DBI drivers (DBI-1.18.tar.gz DBD::mysql) for interfacing perl v5.6.0 (default installation in Darwin) and mysql v3.23.51(installed by me ). I am folowing the instructions given in the readme file for DBI drivers. When I gi

simple(?) quoting problem with DBD::mysql

2002-11-12 Thread Rob Lee
[Please respond directly to me as this address is not subscribed to this list - thnx] When I parameter bind and execute() I get seemingly-subtle errors related to quoting. my $sth = $dbh->prepare("SELECT * FROM ?"); my $table = "tblSites"; $sth->execute($table); DBD::mysql::st execute failed:

Re: how to fetch the result of a select count statement?

2002-11-12 Thread Christopher G Tantalo
Stephane Legault wrote: > I do a lot of select in many statement and fetch the result on a array as > needed. But now one of my staement is a "select count() from ...". How can > I get the value of this statement? I do not know what db you are using, etc, but here we are using oracle on a *nix bo

RE: how to fetch the result of a select count statement?

2002-11-12 Thread Vorce, Tim (T.)
Just like any other return from the database $sql_text= "select count(*) from $cursor = $dbh->prepare($sql_text); if (!$cursor) { # error creating cursor $value=0; } # !cursor unless ($cursor->execute) { $value=0; # can't execute } $value =$cursor->fetchrow;

how to fetch the result of a select count statement?

2002-11-12 Thread Stephane Legault
I do a lot of select in many statement and fetch the result on a array as needed. But now one of my staement is a "select count() from ...". How can I get the value of this statement?

compiling for dynamic location installation

2002-11-12 Thread George C Mccone
I would like to compile DBI ( and the DBD::Sybase to go with it ) such that I can make it part of our software distribution. Since the software can be installed in various locations, a compile with a fixed prefix won't work. As part of the install of our software, an environment variable is set th

RE: DBD-Oracle-1.12 compilation fail on hp-unix 11

2002-11-12 Thread Rose, Bill
Make sure you comb through the README files. One thing that I believe you will have to do for HP/UX is a LINKTYPE=static. Do you know if you have an ANSI C compiler installed? -Original Message- From: Zhao, Yi (CRTRES) [mailto:Yi.Zhao@;concert.com] Sent: Monday, November 11, 2002 3