Hi.
- Original Message -
From: "Murali Kanaga" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, January 17, 2002 12:44 PM
Subject: DBI ProxyServer & SQL
> Hi Gurus,
>
> I am trying to connect to SQL from Solaris using DBD::ProxyServer.
>
> This script ask the user for Bug
"Flowers, Jay" wrote:
>
> I am not sure if this is the right place to be asking such a question?
>
> I am writing a sniffer in perl and would like to be able to decode data in
> TCP packets from SQL clients and servers. I was wondering if there was part
> of the DBI that I could use to decode t
Hi Gurus,
I am trying to connect to SQL from Solaris using DBD::ProxyServer.
This script ask the user for Bug Fix number ($bfn). Then, it passes
this variable to check the SQL for existence.
Any help/ideas would be very much appreciated.
Thanks,
Murali
Here is the error:
DBD::Proxy::st exec
Thanks to Michael Chase for his suggestion of using TO_NUMBER on
the outside of the TO_CHAR - it works *WITH* placeholders this
way:
use DBI qw(:sql_types);
my $sql = qq{
SELECT TO_CHAR(SYSDATE, 'HH24') AS TIME
FROM DUAL
WHERE TO_NUMBER(TO_CHAR(SYSDATE, 'HH24')) >= ?
RE: arbitrary number of bindings & LIKE statementThanks to everyone who replied. I'm
now able to do what I wanted using the "map" command, which I was not aware of before.
And Michael's method of preparing the sql as well as executing it was also a
lesson... thanks.
Just to explain what I wa
There is plenty of documentation on this, but it is not related to DBI.
die() is a Perl specific call and basically kills the script. The
interpreter releases all of it's resources at that time. If memory leak
exists, you must look for things like you db server. DB server usually
release all th
Hi, Michael, thanks for your help.
Could you tell me is there any document to this? I am asking because we
are experiencing memory leak and I am suspicious that our daily DBI
script is causing the memory leak because the statement handler is not
closed properly, etc,etc.
Thanks
-Original M
ODBC is really the only way to access MS Access. You can install third
party ODBC driver on Linux and use that to connect.
Ilya
-Original Message-
From: Martin Stricker
To: [EMAIL PROTECTED]
Sent: 1/16/02 1:03 PM
Subject: MS Access file - accessing from Linux?
I have a MS Access file o
I have a MS Access file on a Linux machine (actually mounted from a
WinNT server using Samba). Is it possible to access this file with Perl
and DBI? If so, what is required to do?
The WinNT file server has no ODBC service enabled, and the IT staff
refuses to enable it, so I can only use a Samba m
Often you get information from another source where the number of elements
is variable so it isn't known when you write the script.
--
Mac :})
** I normally forward private questions to the appropriate mail list. **
Give a hobbit a fish and he eats fish for a day.
Give a hobbit a ring and he eats
A die() call shuts down the entire script. Everything gets closed during
shutdown.
--
Mac :})
** I normally forward private questions to the appropriate mail list. **
Give a hobbit a fish and he eats fish for a day.
Give a hobbit a ring and he eats fish for an age.
- Original Message -
Fr
You need to start a little earlier. Build the SQL so it has the desired
number of placeholders.
# The default error message is more thorough that your die()
$dbh -> {RaiseErrors} = 1;
# Assuming @names has the correct number of values
my ( @where, @vals );
foreach ( @names ) {
push @where, "
> From: Tony Vassilev [mailto:[EMAIL PROTECTED]]
> my $sth = $dbh->prepare($sql) || die "couldn't prepate";
What's the sql look like?
What results do you expect/get?
> $sth->bind_param(1, "%$names[0]%");
> $sth->bind_param(2, "%$names[1]%");
> $sth->execute() || die "error
I hope $id is the Perl variable that contains the actual field name and not
the field name.
Have the script dump the table name and SQL to a separate file and try to
execute it from SQL*Plus after you have logged in in the same account as the
webserver runs in.
--
Mac :})
** I normally forward pr
This belongs on dbi-users, so I am sending this response there.
You can make the change in your tnsnames.ora file or have the DBA make the
change in Oracle*Names if you are using that.
The very temporary workaround of "dbi:Oracle:host=123.123.123.123;sid=live"
should have worked as well. Try 'D
On Wednesday, January 16, 2002, at 07:54 AM, Tony Vassilev wrote:
>
> That method of course requires that I know the number of bindings
> ocurring.
> For an arbitrary number, I've been trying this:
>
> my $sth = $dbh->prepare($sql) || die "couldn't prepate";
> foreach $x (0..$#names) {
What is the SQL you are running?
For me looks like you are getting error message in your PL/SQL block.
--Raju
-Original Message-
From: Marius Keraitis [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, January 16, 2002 12:27 AM
To: DBI Perl
Subject: whats da error?
when i trying to select
When the Oracle SQL parser sees a number on one side of the '=' in the WHERE
clause it can tell that character to number conversion is needed and does it
for you. With placeholders, it doesn't have that information.
--
Mac :})
Give a hobbit a fish and he eats fish for a day.
Give a hobbit a ring
Sorry if this is off-topic (not directly DBI), but I can't seem to figure
out what's going on...
I've never used the MSSQLReporter module before, and can't seem to get
anything to work!
When I call $reporter -> get_fieldNames($fieldname) with any variable I get
a prepare failed error on the ta
I went with "use Memoize;" and rewrote GetUser() slightly.
Since Memoize is interested in args passed and return values, I opted to
change the behavior of GetUser() to return a hash ref.
my $user;
$user = &inc::db::GetUser($id);
.inc/db.pm...
use Memoize;
memoize('GetUser');
use DBI;
sub
>From the reporst posted here, it works fine with Oracle 9i, though I haven't
tried myself.
Ilya
-Original Message-
From: FOHEY,DON (HP-USA,ex1)
To: '[EMAIL PROTECTED]'
Cc: ASP,WAYNE (HP-USA,ex1); WOODARD,BJ (HP-USA,ex1); 'Daniel Vredeveld'
Sent: 1/15/02 3:19 PM
Subject: DBD-Oracle-1.12
God morning!
I am a novice DBI user and would appreciate your help with a challenge I
have.
Basically, I need toquery an informix table and return a list qualified
records. This I can as I can loop through the hash and print the data.
What I need to do, once i have the qualified records, is mod
Ronald J Kimball wrote:
> On Tue, Jan 15, 2002 at 03:25:54PM -0600, Tomasi, Chuck wrote:
>
>>@UserCache; # Place to store data already seen
>>sub GetUser
>>{
>> my ($id, $user)=@_; # record number and hash reference to populate
>>
> ^^^
>
>> if (defined($User
DBD-Oracle-1.12 is clearly supported with Oracle 7 and Oracle 8.
Is it reasonalbe to expect that this version would work with
Oracle 9i, ie are there known differences in the OCI interface
that would prevent it from working?
The software stack is:
Perl 5.6.1
DBI-1.20
DBD-1.12
Oracle 9i
HPUX 11
> From: Shao, Chunning [mailto:[EMAIL PROTECTED]]
>
> But it did not mention that whether it will close the connection with
> the database, close the statemnet handle, return the resource to the
> operating system, etc.
>
> Can we trust RaiseError On option?
Trust it to do what??
If you want
Hi all. Finally got the success. It was due to Jay Stauss's suggestion about setting
the SHLIB_PATH. I strongly reccomend this for anyone having problems building the DBD
module on HP-UX.
Thanks,
Taylor
Taylor Lewick
Unix System Administrator
Fortis Benefits
816 881 6073
"Help Wanted. Seek
Flowers, Jay wrote:
>
> I am not sure if this is the right place to be asking such a question?
>
> I am writing a sniffer in perl and would like to be able to decode data in
> TCP packets from SQL clients and servers. I was wondering if there was part
> of the DBI that I could use to decode the
Jay Strauss has done some nice editing and added some useful information
to the README.hpux (a new version of which I now attach) He suggests that
LD_LIBRARY_PATH does no good on this platform, and changed the reference
for SHLIB_PATH (the HP-UX equivalent). I am fine with this, although I
suspec
Reading from the man page on unix machine, it only says that
When set "on", any
method which results in an error will cause the DBI to
effectively do a `die("$class $method failed:
$DBI::errstr")', where `$class' is the driver class and
`$method' is the name o
Marius,
Please provide the query that is referenced by $sth. The error number
refers to a problem compiling PL/SQL code. My guess is that you have a
syntax error in a stored procedure.
-dpf-
---
David P. Fannin
Database Administrator [EMAIL
You can call stored procedure just like any other statement. Here's a
snipplet:
$sth = $dbh->prepare( 'call myproc(?)' );
$sth->execute( 'parm1' );
while( @row = $sth->fetchrow_array )
{
# do something
}
Regards,
Michael
David Shrewsbury <[EMAIL PROTECTED]>
> Hello All:
>
> I need help with DBI/DBD. After installing DBI, I try to install DBD::Pg
> but I get an error when running make, that it cannot find the target (see
> below). Also if anyone has installed FreeIPdb, why does the website say
> to install DBD::Pg.1.39 or better, and then direct y
Hi,
I'm a newbie trying to get a grip on the bind_param function:
If I'm trying to execute an SQL statement with several placeholders,
the following method of binding works (I get the proper data returned):
my $sth = $dbh->prepare($sql) || die "couldn't prepate";
$sth->bind_param(1,
A new version (0.56) of SPOPS (Simple Perl Object Persistence with
Security) has been released to CPAN.
SPOPS is a robust and powerful module that allows you to serialize
objects. You can create most objects without any code, just
configuration.
This release overhauls the error reporting system,
34 matches
Mail list logo