Well, just using CGI, it's pretty complex. You'll have to somehow cache it
in a running daemon and somehow share that env. Now if you are using
mod_perl is pretty much doable and recommended, since the database
connections attribute to about 80% of the slowdown of web applications, so
caching the
On Wednesday, December 18, 2002, at 07:42 AM, G S wrote:
Is it possible for a perl script to use a database connection that was
previously opened in another perl script, or must each perl script
open it's own database connection?
In general, the answer is No. It does depend on the DBD::Xyz
On Thu, 19 Dec 2002 12:53:13 +1100 [EMAIL PROTECTED] wrote:
> I'm getting this error message when executing my Perl DBI commands.
>
> Can't call method "prepare" on an undefined value
>
> When the script is running using localhost as the database server,
> everything works, however, when
Hello everyone,
Has anyone ran .sql scripts with connecting though DBI? If so did u ever use dbi and
system in the same perl script? Like connect with DBI then run 3 different .sql's and
then exit the program when u come back in use system to connect and run another
script? Next question "D
G'day,
I'm getting this error message when executing my Perl DBI commands.
Can't call method "prepare" on an undefined value
When the script is running using localhost as the database server,
everything works, however, when I run the code on another machine, and I
need to use it remotely
On Wed, Dec 18, 2002 at 05:13:45PM -0500, Chris Faust wrote:
> Thanks Ronald, your right as that is what I doing as the first form page is
> the user input for the description and then they can "preview" it in another
> page before the post.
>
> Thing is I'm using CGI and I thought that all escapi
On Wed, 2002-12-18 at 14:19, Paul Boutros wrote:
> That's the return value from a non-select SQL statement's execution. This
> is in the DBI documentation, I believe.
>
> Basically, you want:
>
> my $sql = 'UPDATE TEST SET TEST.TEST1 = 3 WHERE TEST.TEST2 = 2';
> my $sth = $dbh->prepare($sql);
>
That's the return value from a non-select SQL statement's execution. This
is in the DBI documentation, I believe.
Basically, you want:
my $sql = 'UPDATE TEST SET TEST.TEST1 = 3 WHERE TEST.TEST2 = 2';
my $sth = $dbh->prepare($sql);
my $rows_affected = $sth->execute();
On Wed, 18 Dec 2002, Adam P
Thanks Ronald, your right as that is what I doing as the first form page is
the user input for the description and then they can "preview" it in another
page before the post.
Thing is I'm using CGI and I thought that all escaping is handled with the
module..
Or so to say at the top of my script I
hi,
i'm running a cgi script that updates a database. i would like to capture
the number of rows affected by the update, but can't figure out how to. i
would like $rows_affected to equal the standard "(1 row(s) affected)" that
is returned from a worksheet.
thanks for any help.
-adam
__
Thanks and sorry for the late reply Hardy..
I tried using qq{} instead of " and the same thing is happening.
As for the where clause, your right there should be one there - I was just
showing an example of how I was doing the placeholder, the real statement
would have been too much text :)..
If y
Thanks for all the good help on this question ... However, I still need
more help to get it to work.
use DBI;
...
$DBH = DBI->connect("dbi:Sybase:$server", $user, $password);
// unless ($DBH) { ... }
// now I have have tried the following and neither one worked: 1. $sth =
$DBH->prepare("$database
On Wed, 18 Dec 2002 09:49:28 -0500, John Day wrote:
>I would like to rewrite an application using DBI, DBD and mySQL so that
>I can prepare a several statements once using placeholders and then
>execute them within a loop without re-preparing them.
I just don't get why you call these "nested". Th
>
> Fair enough comments on using a driver manager.
>
> I had tried to get iODBC up, but it barfed on a library I
> couldn't track down - at run time, not compile/link time. I
> started on unixODBC too, but then concluded I didn't want to
> confuse myself - or it, or iODBC - by installing its
>
> Hi,
>
> I have a problem that my program crashes, since I added a
> second connect in a loop. I know that the code isn't good yet
> (I should use placeholders), but it shouldn't crash anyway?
No, it shouldn't -- but I can't see the crash message -- what does the
dialog box say?.
Pleas
Environment WinNt, Perl v5.6.1
code
while (1) {
$dbh = DBI->connect($orcs, $uname, $passw,
{
RaiseError => 0,
PrintError => 0,
AutoCommit => 0
}) or dberr("C");
$conn_count++;
sleep 2;
$dbh->disconnect;
undef $dbh;
sleep 8;
last if $conn_count > 10; # 100 sec total
}
No mem leak, mo
On 18-Dec-2002 Jonathan Leffler wrote:
>
>
>
>
> Dear Jeff,
>
> Fair enough comments on using a driver manager.
>
> I had tried to get iODBC up, but it barfed on a library I couldn't track
> down - at run time, not compile/link time. I started on unixODBC too, but
> then concluded I didn't
On Wed, 18 Dec 2002 12:16:11 -0600 "Zhou, Bixia" <[EMAIL PROTECTED]> wrote:
> I moved declare $dbh out of loop as you suggested, but memory usage didn't
> stop to grow.
There may be a leak somewhere, but someone else will have to find it. When
I had a perpetual script like this, I had it exit af
Hi,
I have a problem that my program crashes, since I added a second connect in
a loop. I know that the code isn't good yet (I should use placeholders), but
it shouldn't crash anyway? The trace(2) is attached, and this is the main
part of the code:
$db2dbh = DBI->connect("dbi:ODBC:DB2I21", "tefi
Dear Jeff,
Fair enough comments on using a driver manager.
I had tried to get iODBC up, but it barfed on a library I couldn't track
down - at run time, not compile/link time. I started on unixODBC too, but
then concluded I didn't want to confuse myself - or it, or iODBC - by
installing its l
On Wed, 18 Dec 2002 11:08:14 -0600 "Zhou, Bixia" <[EMAIL PROTECTED]> wrote:
> We are currently using: perl, v5.8.0 built for MSWin32-x86-multi-thread
> The test code as following:
> my $process = 1;
> while ($process){
> my $dbh = DBI->connect('dbi:Oracle:sid', $user, $pass, { AutoCommit =>
> 0
On Wed, 18 Dec 2002 07:42:53 -0800 G S <[EMAIL PROTECTED]> wrote:
> Is it possible for a perl script to use a database connection that was
> previously opened in another perl script, or must each perl script open it's
> own database connection?
Possible, depending on the RDBMS, but very tricky
On Wednesday, December 18, 2002, at 01:27 AM, Dominic Mitchell wrote:
% psql -l
List of databases
Name| Owner | Encoding
---+--+---
dom | dom | UNICODE
template0 | postgres | SQL_ASCII
template1 | postgres | SQL_ASCII
(3 rows)
I'm using th
We are currently using: perl, v5.8.0 built for MSWin32-x86-multi-thread
The test code as following:
my $process = 1;
while ($process){
my $dbh = DBI->connect('dbi:Oracle:sid', $user, $pass, { AutoCommit => 0
});
if ($dbh =~ /ERR/)
{
exit;
}
$dbh->disconnect;
undef $dbh
Why are you using DBD::JDBC? What's the advantage over using a native DBD driver?
Ilya
-Original Message-
From: Alan Thompson [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, December 18, 2002 10:29 AM
To: [EMAIL PROTECTED]
Subject: DBD::JDBC and Oracle CLOB
I am using DBD::JDBC (0.64) with
Send us the relavant part of the code as well as the error messages you are
getting. Before you do that, you might want to try tracing your problem
with trace(2, log.txt)
Ilya
-Original Message-
From: Khaliq, Abdul (A.) [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, December 18, 2002 11:19
Yes, that is what prepares are for.
Ilya
-Original Message-
From: John Day [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, December 18, 2002 9:49 AM
To: [EMAIL PROTECTED]
Subject: Nested prepares
I would like to rewrite an application using DBI, DBD and mySQL so that I can prepare
a severa
I am migrating the application from old environment (PERL 5.004, CGI 2.36, DBI 0.91)
to new environment (PERL 5.6.0, CGI 2.68, DBI 1.14). One of the SQL queries in PERL
program not executing. It is a query in which I am selecting about 40 fields from a
single database table and SUM functions i
Is it possible for a perl script to use a database connection that was
previously opened in another perl script, or must each perl script open it's
own database connection?
_
Protect your PC - get McAfee.com VirusScan Online
ht
I am using DBD::JDBC (0.64) with DBI 1.27 to connect to various databases. I have come
across a problem reading Oracle CLOBs.
Eventually, I noted that the DBD::JDBC readme says this isn't supported, and I also
found a discussion about 2 years ago on this list indicating the same.
Has any
John Day [[EMAIL PROTECTED]] wrote:
> I would like to rewrite an application using DBI, DBD and mySQL so that I can
>prepare a several statements once using placeholders and then execute them within a
>loop without re-preparing them.
>
> Basically for each of about 2,000 clients I have to read u
I would like to rewrite an application using DBI, DBD and mySQL so that I can prepare
a several statements once using placeholders and then execute them within a loop
without re-preparing them.
Basically for each of about 2,000 clients I have to read up to 750,000 records, modify
each one and w
my $port = '1521';
my $orcs = "dbi:Oracle:host=$host;port=$port;sid=$dbname";
Works here,
HTH
"Christian Merz" <[EMAIL PROTECTED]> wrote in message
012101c2a69c$faecff20$[EMAIL PROTECTED]">news:012101c2a69c$faecff20$[EMAIL PROTECTED]...
> Hi folks,
> my 'perldoc DBD::Oracle' says in 'CONNECTING TO
Isn't it specified in your tnsnames.ora? I'm not familiar with a way to
specify a port to sqlplus. I thought it just pulled it from tnsnames.ora.
If you can connect using sqlplus as:
$ sqlplus scott/tiger@test
then I think
$dbh = DBI->connect('dbi:Oracle:test','scott','tiger');
should work. The
Hi folks,
my 'perldoc DBD::Oracle' says in 'CONNECTING TO ORACLE':
If a port number is not specified then the descriptor will
try both 1526 and 1521 in that order (e.g., new then old).
You can check which port(s) are in use by typing
"$ORACLE_HOME/bin/lsnrctl stat" on the server
http://xmlproj.com/fom-serve/cache/13.html
http://search.cpan.org/author/TIMB/DBI-1.32/
José.
> -Original Message-
> From: nick shen [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, December 18, 2002 2:15 AM
> To: [EMAIL PROTECTED]
> Subject: How to install DBI in Windows 2000
>
>
> Hi
>
This is following on from a discussion on use.perl.org[1].
I'm trying to get Unicode back from a Postgres 7.3 database under perl
5.8 (DBD::Pg 1.20). I've got this test script:
#!/usr/bin/perl -w
use strict;
use warnings;
use 5.008;
use charnames ':full';
use DBI;
my $dbh =
DBI->connect( 'd
Hi
(BI want to use perl to connect Oracle DBI from my PC ( windows 2000).
(BBut I can't use it.I think it necessary to install DBI .
(BWhat kind of DBI modules I should have and Where can I get these
(Bmodules( for windows 2000)?
(Byour support would be highly appreciated.
Quoth <[EMAIL PROTECTED]>:
: > osql comes with the client tools. If you have Enterprise
: > Manager, then
: > you've got it.
:
: I thought that there should be something with it... though the enterprise
: manager is on the server, can I install it also locally?
Yes, you can install MS SQL client
Hi,
i have made some changes to the Apache::AuthDBI Modul.
Who is now the conact person for this modul?
Or where is the homepage of the project?
Thanx
--
Sven Jörns
- Forwarded message from Sarabjit Singh <[EMAIL PROTECTED]> -
Delivered-To: [EMAIL PROTECTED]
Date: Wed, 18 Dec 2002 12:20:05 +0800
From: "Sarabjit Singh" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Subject: Oracle 9i Release 2(64 bit) on Solaris8 64 bit and DBD 1.12
Hi Tim
We have 9i
On Wednesday, Dec 18, 2002, at 01:26 Europe/London, Jeff Zucker wrote:
Just a preliminary report - thanks to Rainier Keuchel's port of perl
to winCE, I now have DBI (PurePerl) and DBD::AnyData doing database
read access on my Toshiba e740 (a palm-like handheld running pocketPC
on an xScale pro
42 matches
Mail list logo