bind_param and bind_param_inout on insert

2002-03-26 Thread Stacy Mader
I'm trying to bind paramenters on an insert and return a value: $sth = $dbh->prepare(q{ INSERT INTO TEST VALUES (TEST_SEQ.NEXTVAL,:project_no,:issue) RETURNING fault_no INTO :rv }); $sth->bind_param(':project_no','P999'); $sth->bind_param(':issue','This is the issue.'); $sth->bi

Does failed PREPARE close db handle?

2002-03-26 Thread Capacio, Paula J
Hello...it's late and I may very well be brain-dead...that aside... Does a failed PREPARE close the db handle or am I doing something wrong? When a prepare fails I want to exit with a return code of 243. I don't want to waste or tie up resources, and I assume that I am still connected and exec

RETURNING CLAUSE

2002-03-26 Thread Stacy Mader
Hi all, I'm looking to use a returning clause to return a number generated from an Oracle sequence (test_seq). I'm using Oracle 8.1.7 with DBD::Oracle v1.12 and DBI v 1.21. My table has just on column: FAULT_NO The code: #!/usr/local/bin/perl use DBI; use strict; $dbh = DBI->connect($data

Re: DBD::Sybase w/ FreeTDS getting 'DBD::Sybase - can't change contextto database X'

2002-03-26 Thread Michael Peppler
Bill McClintock writes: > Michael, > > I believe I have found my issue. The database names on the SQLServer > contain minus '-' characters. I have re-created a test set using > underscore '_' characters and the scripts now select data form the > correct database. I am assuming th

Re: DBD::Sybase w/ FreeTDS getting 'DBD::Sybase - can't change contextto database X'

2002-03-26 Thread Bill McClintock
Michael, I believe I have found my issue. The database names on the SQLServer contain minus '-' characters. I have re-created a test set using underscore '_' characters and the scripts now select data form the correct database. I am assuming that minus '-' characters are bad... Tra

RE: Error on make for DBD-Oracle 1.12 on HPUX 11.0

2002-03-26 Thread Stevenson, Jonathan
I have redownloaded the DBD module, and a problem with the cc compilert has been sorted out, and the make test is passing now. Thanks for the help here. Unfortunately, it is now failing on the make test step - we are getting 'Can't shl_load() a library containing Thread Local Storage' errors. I

RE: Escaping characters

2002-03-26 Thread Stephen Keller
Brad Smith writes: > 1. Which characters will cause errors? > 2. How do I escape them en masse? This isn't strictly a DBI question: it has bitten us in Java, C and Perl. There are provisions in the DBI to handle it. You should look at the DBI quote methods: $sql = $dbh->quote($value);

RE: Grabbing specific number of random rows

2002-03-26 Thread Troy Sniff
Just wanted to say thanks to everyone for their ideas on this issue. I got some great suggestions on how to do it. Troy

Re: Escaping characters

2002-03-26 Thread Simon Oliver
Brad Smith wrote: > > Thank you, but I am not sure what that means. Here is a snippet of the > code I have. How do I change it to include placeholders? And what is > the quote method? Do you mean using quotes instead of apostrophes > around the variables? > Using placeholders: my $sth = $d

Re: Escaping characters

2002-03-26 Thread Simon Oliver
Use placeholders or the quote method. -- Simon Oliver Brad Smith wrote: > > This is another quick newbie question: I am trying to place text into a > field where the text contains an apostrophe, which is causing an error. > My question is two-part: > > 1. Which characters will cause errors

Escaping characters

2002-03-26 Thread Brad Smith
This is another quick newbie question: I am trying to place text into a field where the text contains an apostrophe, which is causing an error. My question is two-part: 1. Which characters will cause errors? 2. How do I escape them en masse? Thanks in advance. Brad Smith

RE: Error on make for DBD-Oracle 1.12 on HPUX 11.0

2002-03-26 Thread LBaxter
Are you sure you are using 1.12? What happens when you hack the makefile to remove the -Wl,+z in the makefile? I have attached my perltree build makefile, which just built everything on HP-UX 11i (DBD-Oracle-1.12) with Oracle 8.1.7. Maybe this is also and Oracle 8.1.6 issue. Aren't your dba's

Re: DBD::SQLite with Japanese Character problem

2002-03-26 Thread Matt Sergeant
On Tue, 26 Mar 2002, Tatsuhiko Miyagawa wrote: > At Tue, 26 Mar 2002 20:27:47 +0900, > KAWAI,Takanori <[EMAIL PROTECTED]> wrote: > > > > I found these lines in "dbdimp.c" must be the point. > > > > line : 375 - 381 > > sv_setpvn(AvARRAY(av)[i], val, len); > > SvUTF8_on(AvA

Error on make for DBD-Oracle 1.12 on HPUX 11.0

2002-03-26 Thread Stevenson, Jonathan
Hi all, I'm having problems getting this to work. I have follows Lincoln's instructions, and recompiled Perl from source using HP's ANSI C compiler, with the specified options: Configure -Ubincompat5005 Additional libraries: prepend -lcl -lpthread ccflags: perpend +z Perl 5.005 binary compatible

Re: DBD::SQLite with Japanese Character problem

2002-03-26 Thread Tatsuhiko Miyagawa
At Tue, 26 Mar 2002 20:27:47 +0900, KAWAI,Takanori <[EMAIL PROTECTED]> wrote: > > I found these lines in "dbdimp.c" must be the point. > > line : 375 - 381 > sv_setpvn(AvARRAY(av)[i], val, len); > SvUTF8_on(AvARRAY(av)[i]); > } > else { > sv_se

Re: DBD::SQLite with Japanese Character problem

2002-03-26 Thread KAWAI,Takanori
I found these lines in "dbdimp.c" must be the point. line : 375 - 381 sv_setpvn(AvARRAY(av)[i], val, len); SvUTF8_on(AvARRAY(av)[i]); } else { sv_setsv(AvARRAY(av)[i], Nullsv); SvUTF8_on(AvARRAY(av)[i]); } (included in sqlite_

Help Needed in Installing DBD-Oracle on HP-UX 11.00

2002-03-26 Thread Abhijit V S
Hi Folks, I am facing some problem while installing DBD-Oracle on HP-UX 11.00 64Bit Mc.The problem appears in the make stage giving following error message. ld: Can't find library or mismatched ABI for -lclntsh Fatal error. *** Error exit code 1 Stop. Could you please help me in solving the ab