See below.
--
Mac :})
** I normally forward private database questions to the DBI mail lists. **
Give a hobbit a fish and he'll eat fish for a day.
Give a hobbit a ring and he'll eat fish for an age.
- Original Message -
From: "Tony Foiani" <[EMAIL PROTECTED]>
To: "Jim Lynch" <[EMAIL PROTE
Alzabo is a two-fold program. Its first function is as a data
modelling tool. Through either a schema creation interface or a custom
perl program, you can create a set of schema, table, column,
etc. objects that represent your data model. Alzabo is also capable of
reverse engineering an existing d
Ladies and Gentlemen:
Sorry to be using your talent on such a newbie problem. We are trying to
install ODBC on an RS6000 running AIX 4.3.0. Perl, DBI and CGI are all
working OK.
We started to install ODBC and found we needed an iODBC Manager and a
ODBC driver. We also found there was an iODBC Ma
The original oracle error message was
ORA-01400: cannot insert NULL into ("GRCT"."CGNT222_HELP_USER"."ID_RACF") (DBD ERROR:
OCIStmtExecute)
instead of
ORA-01008: not all variables bound (DBD ERROR: OCIStmtExecute). (apologize for the
miscommunication)
--- Rajesh Yenumulapally <[EMAIL PR
> "Michael" == Michael Peppler <[EMAIL PROTECTED]> writes:
Michael> There was a fairly long thread in comp.databases.sybase on
Michael> this issue. Joe Celko weighed in with this comment:
Found it.
http://www.deja.com/[ST_rn=ps]/threadmsg_ct.xp?AN=714120405&fmt=text
Michael> 4) Attempti
Hi again
here I am using the same databse for both the web
servers.I am getting the error ORA-01008: not all
variables bound (DBD ERROR: OCIStmtExecute).
Based on this shall I am assume there is something
fault with the installation and configuration of the
DBI or DBD::Oracle on the web server rat
Tony Foiani writes:
> > "Michael" == Michael Peppler <[EMAIL PROTECTED]> writes:
>
> Michael> I believe that SQL-92 mandates that a non-null string be at
> Michael> least one character in length.
>
> Interesting. The Oracle docs say:
> Michael> Certainly Sybase (and I presume MS-S
> "Michael" == Michael Peppler <[EMAIL PROTECTED]> writes:
Michael> I believe that SQL-92 mandates that a non-null string be at
Michael> least one character in length.
Interesting. The Oracle docs say:
Oracle currently treats a character value with a length of zero as
null. However,
>
> And since these are placeholders, no quotes of any kind, as in Graham's
> orginal, will work even better :-)
Sorry, ignore my foolishness, of course the quotes are needed, they're
just not needed in the final SQL. I go back to bed now.
--
Jeff
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
On Wed, Feb 07, 2001 at 09:50:23AM +0100, Hans-J. Krause wrote:
> A database *never* should accept an insert of an empty string in a not null
> column
Actually, it should. According to SQL-92, '' != NULL. Oracle has threatened to
fix the behavior f
Ronald J Kimball wrote:
>
> On Wed, Feb 07, 2001 at 09:48:49AM -0800, William R. Mussatto wrote:
> > On Wed, 7 Feb 2001, Graham Barr wrote:
> >
> > > Date: Wed, 7 Feb 2001 17:07:53 +
> > > From: Graham Barr <[EMAIL PROTECTED]>
> > >
> > > While everyone is posting thier favorite way to create
On Wed, Feb 07, 2001 at 09:48:49AM -0800, William R. Mussatto wrote:
> On Wed, 7 Feb 2001, Graham Barr wrote:
>
> > Date: Wed, 7 Feb 2001 17:07:53 +
> > From: Graham Barr <[EMAIL PROTECTED]>
> >
> > While everyone is posting thier favorite way to create a placeholder
> > list I thought I wou
On Wed, Feb 07, 2001 at 10:10:11AM -0700, [EMAIL PROTECTED] wrote:
> Is there an example of the selectrow_array method using bind variables? I
> have not been able to successfully use the example in the book "Programming
> the PERL DBI".
> Since I use this $dbh for another statement against the
Tony Foiani writes:
> > "Hans-J" == Hans-J Krause <[EMAIL PROTECTED]> writes:
>
> Hans-J> A database *never* should accept an insert of an empty string
> Hans-J> in a not null column - otherwise what for should a
> Hans-J> not-null-check to be set?
>
> If you said "Oracle database",
On Wed, 7 Feb 2001, Graham Barr wrote:
> Date: Wed, 7 Feb 2001 17:07:53 +
> From: Graham Barr <[EMAIL PROTECTED]>
> To: dbi-users <[EMAIL PROTECTED]>
> Subject: Re: How do I form an acceptable string for an IN clause?
>
> While everyone is posting thier favorite way to create a placeholder
>
> "Hans-J" == Hans-J Krause <[EMAIL PROTECTED]> writes:
Hans-J> A database *never* should accept an insert of an empty string
Hans-J> in a not null column - otherwise what for should a
Hans-J> not-null-check to be set?
If you said "Oracle database", I'd agree. (And, given the rest of
your
Another way to construct a reasonable "IN" clause is to use the
DBI::quote method:
| my @vals = ('foo', "bar", "baz's");
| my $set = join ', ', map $dbh->quote($_), @vals;
| my $sql = "SELECT whatever FROM wherever WHERE somecolumn IN ($set)";
Note that this will properly handle the single qu
While everyone is posting thier favorite way to create a placeholder
list I thought I would send my favorite.
chop(my $qus = "?," x @values);
$sth = $dbh->prepare(qq{ ... ($qus) ... });
Graham.
On Wed, Feb 07, 2001 at 09:03:15AM -0800, Warden, Ronald MCF:EX wrote:
> You have to use a do statement, you can't use a prepare statement. From the
> perl manual
Actually, you can use a "prepare", however it appears that you
can not use a bound parameters in a DDL statement (at this time). As
Is there an example of the selectrow_array method using bind variables? I
have not been able to successfully use the example in the book "Programming
the PERL DBI".
In my code, I have a previously prepared $dbh handle as follows:
$instance = "crsprod";
$username = "**";
$password = "***
On Wed, Feb 07, 2001 at 11:50:01AM -0500, Thomas A. Lowery wrote:
> > Is placeholders not allowed in DDL statements or what?
>
> Looking at this, I'd say no. Note the describe is skipped, so I'd say
> the statement isn't really parsed by Oracle until the execute is
> called.
>
> dbd_prepars
Lars,
You have to use a do statement, you can't use a prepare statement. From the
perl manual
Prepare and execute a single statement. Returns the number of
rows affected (-1 if not known or not available) or undef on error.
This method is typically most useful for non-select statements w
> Is placeholders not allowed in DDL statements or what?
Looking at this, I'd say no. Note the describe is skipped, so I'd say
the statement isn't really parsed by Oracle until the execute is
called.
dbd_preparse scanned 1 distinct placeholders
OCIHandleAlloc(0x81c2d18,0x81e94d4,4,0,(nil))=
On 2001-02-07 09:58:17 -0500, Jim Lynch wrote:
> my $in_clause1="'abcdef','xzyrst'";
> my $in_clause2="'abcdef'";
>
> sth=$db->prepare("select * from table_x where txt in (?)");
>
> and gotten the same results. Can someone please tell me if it's
> possible to generate an IN clause on the fly an
In perl, there are (naturally) many ways to do things... I recall doing
this other somewhat more brute force ways, but I particularly, like
this fragment for IN clauses...
slick.
Perhaps we should add this example could be added to the DBI pod?
-Original Message-
From: Ronald J Kimbal
On Wed, Feb 07, 2001 at 09:58:17AM -0500, Jim Lynch wrote:
> I've tried everything except standing on my head to get it to work.
> This example should show what I'm attempting to do. As long as the
> clause has only one element, it works.
>
> my $in_clause1="('abcdef','xzyrst')";
> my $in_claus
Jim,
> my $in_clause1="('abcdef','xzyrst')";
> my $in_clause2="('abcdef')";
>
> sth=$db->prepare("select * from table_x where txt in ?");
> $sth->execute($in_clause1);
> # that works
> $sth->execute($in_clause);
> # this doesn't
I'm guessing you might have just included a typo in your example,
Yes, sorry. I didn't take it from a running example. I guess I should
have..
Jim.
Maria Quinn wrote:
>
> Jim,
>
> > my $in_clause1="('abcdef','xzyrst')";
> > my $in_clause2="('abcdef')";
> >
> > sth=$db->prepare("select * from table_x where txt in ?");
> > $sth->execute($in_clause1);
> > # t
I've tried everything except standing on my head to get it to work.
This example should show what I'm attempting to do. As long as the
clause has only one element, it works.
my $in_clause1="('abcdef','xzyrst')";
my $in_clause2="('abcdef')";
sth=$db->prepare("select * from table_x where txt in
try removing the carriage return from the user name and password and see if
that helps
-Original Message-
From: Seger, Jeffrey [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, February 07, 2001 8:54 AM
To: 'David Sherrington - Enterprise Services- Data Management Systems
Engineer'; [EMAIL PROT
Hi'
I am trying to construct an DBI SQL statement like:
$my_stmt = $my_dbcon->prepare("CREATE TABLE BLABLABLA AS (SELECT * FROM ANOTHER_TABLE
WHERE ID = ?)");
:
:
$my_stmt->execute($ID);
When i do this i get the following DBD error:
DBD::Oracle::st execute failed: ORA-01036: illegal
Does the password file contain only one password? If so, does it contain a
newline character at the end of it?
-Original Message-
From: David Sherrington - Enterprise Services- Data Management Systems
Engineer [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, February 07, 2001 6:53 AM
To: [EM
Date sent: Wed, 7 Feb 2001 11:53:06 + (GMT)
From: David Sherrington - Enterprise Services- Data Management
Systems Engineer <[EMAIL PROTECTED]>
Send reply to: David Sherrington - Enterprise Services- Data Management
Systems Engineer <[EMAIL PROTECTED]>
Hello,
I've have a problem with connecting to an Oracle database using DBI under Unix.
Basically, I have the Database user passwords in a unix flat file, which I read
into the perl script setting a local variable. The Oracle database name and the
User name a passed to the perl script as arguem
A database *never* should accept an insert of an empty string in a not null column -
otherwise what for should a not-null-check to be set? On the otherhand your string is
not empty (1 blank: ' '), but in standard oracle is making an ltrim() on strings
before inserting to remove leading blanks -
35 matches
Mail list logo