The PerlDoc version works with a DB by treating it as a file, but
you still have the overhead of selecting and returning all that
data over a relatively slow network. An even better approach is
to randomly calculate the id to select. If your IDs are integers
and contiguous, this is relatively
Hi Patrick:
You wrote:
I've been looking around, and it appears as though you succeeded
because of two factors in your favor, which are not in mine:
1) You probably know what you're doing already
Man do I wish that were true! I just stumble around in the dark
until I stub my toe on a
Well, I just tried to install the latest DBI on a MacOSX machine using the
following:
sudo perl -MCPAN -e shell
cpan install DBI
It went without a flaw and passed all of its tests. The test system is
running MacOSX 10.1.4 on a G4 Cube. The development tools are reasonably up
to date and I've
Hi Philip, you wrote:
This is a programming/algorithm question: How would you store
an unordered
list of unordered lists in an RDBMS?
+-++
| pid | name |
+-++
| 1 | Rei|
| 1 | Minako |
| 1 | Michiru|
I've intermixed DBI.pm (connecting to DB2) and CGI.pm a lot, so
I'm pretty sure there is no name conflict between the two. One
problem, I've run into frequently, however, is that the configuration
of the account when running from the web server is sometimes
deliberately limited. One way that
:[EMAIL PROTECTED]]
Sent: Monday, April 29, 2002 8:39 AM
To: [EMAIL PROTECTED]
Subject: RE: How to call stored procedure?
-- Stephen Keller [EMAIL PROTECTED]
Ed, you asked about stored procedures in DBD::DB2 land...
According to the IBM CLI documentation, you can only call
Jayce writes:
how many rows are returned, so I can set up my x, y axis right.
my $number_rows = $csr-rows;
easy ;D
Not so easy: I cite from the DBI perldoc:
Generally, you can only rely on a row count after a
non-SELECT execute (for some specific operations like
UPDATE and
Lee, you asked about pod2man:
Well, pod2man is part of the standard Perl installation (but I think
it can be turned off, if you don't want to install the documentation).
It is used to read the POD documentation from a Perl source module and
convert it into man page format.
The program is
Hi Lee:
You must have the DB2 client environment installed on any machine
where you expect to run DBD::DB2 perl applications. That driver
is dependent on the client libraries. You will also get this error
when the client is installed, but you have failed to set the
DB2INSTANCE environment
Bill McClintock asks about different date formats,
I need to find a way to get date fields in a database to be
returned in the same formatting. I have an MSSQL database but
the end clients are linux w/ DBD::Sybase (FreeTDS build) and
WinNT w/ DBD::ODBC.
DBD::Sybase returns dates
Hi Xu, Yilin, you asked about a script that complained:
Undefined subroutine DBI::dr::connect called at
/usr/lib/perl5/site_perl/5.6.0/i386-linux/DBI.pm line 471.
I think the explicit use of DBD::mysql is causing the problem. I
don't have a mysql installed, but try commenting out that use
and link DB2 executables, then it is possible that the development libraries
were not installed, so the compiler can't see the necessary .h files
because
they are in fact not there. If that proves to be the case, see your
friendly
system admin to correct that omission.
Hope this is helpful.
Stephen
Do you mean the $sth-{Statement} attribute?
-Original Message-
From: Ido Trivizki [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, April 03, 2002 5:53 PM
To: [EMAIL PROTECTED]
Subject: as_string
I would like to suggest an as_string function that would work like:
Hello Bogdan Badiu, you asked about database connects and forks.
Well, I tried both your scripts out on a Linux machine and got no errors
at all. I was also able to get the fork to work on a Windows 2000 machine,
but I don't have the DBI installed on that box to try the combination. Is
it
Simon Oliver wrote:
Most DBMS's have ODBC and/or JDBC drivers. Couldn't these
two drivers could be included to provide almost universal
access without the need for compilation of vendor specific
DBD's.
But isn't ODBC a C library that must be installed on the client
to work? And
Hello All:
I wrote:
the version of DBI for a given version of the DBD driver. When
these don't match up, the driver doesn't always work correctly.
Tim asked:
Why not, exactly?
Most of the problems we had were compile failures. Features in the
DBI that weren't present in the DBD::DB2
John suggests:
My first thought is to string multiply by the number of elements:
JB1: perl -e print('?',',?'x (ARGV-1)); a b c d e f
?,?,?,?,?,?
or
JB1: perl -e print('?',',?'x (split(',',$ARGV[0])-1)); a,b,c,d,e,f
?,?,?,?,?,?
P.S. I get this on the latter...
I often do the
Tom Price wrote:
Catching errors on Oracle is really, really slow. How about a
BEGIN block that attempts to select the record and does this
logic in SQL?
Well, it's my DB2 experience/Oracle ignorance that was showing. It's true
though, that you will pay a price for attempting the insert
.
Stph
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Thursday, February 28, 2002 6:16 AM
To: Stephen Keller
Cc: [EMAIL PROTECTED]
Subject: RE: SELECT \$moid FROM xyz.abc
Stephen,
Using DB2 V7.1 : DBI : 1.21 DBD::DB2 0.76
db2 describe table
Hi Sachin,
Hopefully, I've not completely misunderstood your question. I'm
stuggling with how to interpret what you mean by the char data
value: that looks like C notation for a pointer. If by char is
being stored in that you column you mean it is a CLOB or other
type of large object, you
, February 27, 2002 10:27 AM
To: Stephen Keller
Cc: [EMAIL PROTECTED]
Subject: RE: SELECT \$moid FROM xyz.abc
Hi Stephen,
I am assuming it is a pointer. The column definition says $MOID stores
CHAR(8).
The actual data I am trying to get is a string like 413567EAFFCXXX 16
characters.
I would think
Hello all:
Justin's approach to use db2profile works great if you are setting up a user
account. But for programs that run as cron (say on the DB host as user
db2inst1), it may not work. The program won't always inherit the proper
environment because cron doesn't invoke the user's startup
Hi Brad,
You asked about getting the DB2 environment set up inside a Perl program.
As far as I know, you must have the DB2INSTANCE variable set for the DB2
connection to work, and I generally set up the DB2 environment with a BEGIN
block in the perl code that's going to use DBI.
Here's a
23 matches
Mail list logo