This is what I use:
require config.ph;
This allows me to put all the passwords, and other config stuff in one file.
-Original Message-
From: Paul Boutros [mailto:[EMAIL PROTECTED]
Sent: Tuesday, March 18, 2003 2:15 AM
To: [EMAIL PROTECTED]
Cc: Jared Still
Subject: RE: Strange security p
Currently, I am using perl DBI against an oracle database, and everything is fine.
However, I am being asked to move it over to a DB2 database. Can anyone tell me about
the relative functionality of connecting and updating a DB2 database?? Any comments
on the general robustness of the two dat
Try setting it as an environmental variable. It is critical that this get done prior
to initiating the connection. It should be something like:
$ENV{NLS_DATE_FORMAT}='/MM/DD HH24:MI:SS';
-Original Message-
From: Doug Hughes [mailto:[EMAIL PROTECTED]]
Sent: Monday, January 27, 2003
I don't know what your $database variable holds. The syntax that I use is this:
$update_cursor = $dbh->prepare("begin sp_Del_MDSAA11_STUSRAPTKN(
\'$id\' ,\'$co\', \'$st\' ,
\'$sc\' ,\'$ap\', \'$tk\' ,
\'$ad\' ,
:output , :out_msg); end;");
I've got 7 input variables here and 2 output
I am selecting several columns. I was hoping that that I could bring the columns into
individual arrays, but that doesn't seem to be right.
the select "select
DSAA25_SITE_C,DSAA25_ROLE_C,DSAA25_SITETYPE_ID_C,DSAA25_COUNTRY_ISO3_C,DSAA25_JOBROLE_C,DSAA25_EMAILTYPE_C
FROM mdsaa25_defaccess where
As a follow-up, I noticed that setting the nls_lang environmental variable causes the
dates to be displayed differently. Doesn't make any sense to me.
You can force the date format with something like this
select
COUNTRY_ISO3_C,ACCT_NAME_N,LANG_ISO_C,to_char(ACCT_UPDATE_S,'DD-MON-:HH:MI:SS
Just like any other return from the database
$sql_text= "select count(*) from
$cursor = $dbh->prepare($sql_text);
if (!$cursor)
{
# error creating cursor
$value=0;
} # !cursor
unless ($cursor->execute)
{
$value=0;
# can't execute
}
$value =$cursor->fetchrow;
I'm a fan of the in statement. It's easy to construct the statement with a join (I
always need quotes around my values), and my guess is that it is more efficient.
There is a limit in my configuration (I think its the oracle that kills it, but it may
be perl), that at about 1,000 entries, it b
It is my impression that the utf flag isn't set unless you explicitly set it. That
seems to impact program stuff rather than data, and that may best be set by the
statement
use utf8;
Tim Vorce
Ford Motor Company
[EMAIL PROTECTED]
-Original Message-
From: Kevin Scaldeferri [mailto:[EM
I think by default it should work with AMERICAN. That is my default. In order to use
extended character set, I set mine to FRENCH_FRANCE. I would suggest that this is a
feature of your database.
Tim Vorce
Ford Motor Company
[EMAIL PROTECTED]
-Original Message-
From: Bacovcin, Micha
Currently, I have inserted a data entry in the database (oracle) that contains an
extended character Pr\351nom to be exact. I tried use utf8 (appears to be for source
text), and
use bytes, but still whenever the data is selected from oracle using dbi, I get back
Prenom, which is not the same t
This may be off topic, but I need help in determining where to go. I have
set up a java script to insert (and select) from my database, the data in
there contains extended characters, the word is Prénom
When I select via a perl dbi script, the data is already corrupted (its
Prenom).
For referen
I'm having trouble with an international setting. I am trying to use french Canadian
into my application. I am using dbi to insert into an oracle table. The intent is to
pull out and display as french. I am not sure if I am inserting correctly, as I am
using xterm to display the table, or a
s
Production Officer
Geography Division
Statistics Canada
(613)951-4591
-Original Message-
From: Vorce, Tim (T.) [mailto:[EMAIL PROTECTED]]
Sent: Thursday, August 15, 2002 8:59 AM
To: [EMAIL PROTECTED]
Subject: Escaping sql strings
Currently, I pass in sql strings as a quoted string, and s
Currently, I pass in sql strings as a quoted string, and single quotes around
variables like this:
$sql="select * from table where column='$code' ";
I now am encountering data that contains a single quote - so that won't work.
How do you suggest passing this in
Tim Vorce
Ford Motor Compan
Doesn't there have to be an entry in the mime type to specify that .pl is executable.
All my scripts are .cgi.
-Original Message-
From: Nick Hoffman [HWA-Inc] [mailto:[EMAIL PROTECTED]]
Sent: Monday, June 24, 2002 2:21 PM
To: DBI-Users
Subject: RE: need execute perms?
Actually, on the
It stays intact just fine, until you do something like
$d->finish; or
$d->disconnect;
-Original Message-
From: Rory Campbell-Lange [mailto:[EMAIL PROTECTED]]
Sent: Friday, May 24, 2002 5:29 AM
To: [EMAIL PROTECTED]
Subject: can I reuse database connections?
I'm new to the list.
I'm writ
Check that the connect on sth actually worked. Then verify that the sql statement is
correct. Try running it in sqlplus.
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, May 21, 2002 8:35 AM
To: [EMAIL PROTECTED]
Subject: DBI "Prepare" Statement Not
At least you have line numbers. My errors always point to line 1. Look at the
various lines in your stored procedures to see what is on those lines in each stored
procedure. That's where your problems lie.
-Original Message-
From: Rahul R M Desai
To: [EMAIL PROTECTED]
Cc: Karthik Gu
You need to use quotes, the correct syntext is
$stmt="SELECT fruit FROM tree WHERE fruit in ('$fruit1','$fruit2')"
-Original Message-
From: Peter J. Holzer [mailto:[EMAIL PROTECTED]]
Sent: Thursday, March 07, 2002 8:36 AM
To: [EMAIL PROTECTED]
Subject: Re: Using IN with prepare clause
I am interested in the module DBIx::Recordset, however, putting
use DBIx::Recordset;
at the top of my script, an error occurs, as the module cannot be located. I think
this is the module I need, how did I get it into the package???
Tim Vorce
[EMAIL PROTECTED]
313-248-9985
I'm trying to do a select within a stored procedure. The problem is in getting
results back. It may have something to do with trying to access a table of returned
values, and my colleague set this up to work with microsoft access, so I'm sure it
must work via perl.
The direct select statem
I am trying to get output of a table from a stored procedure. The select statement
works with fetchall_arrayref, but this is a little different.
The perl code that I have is this:
#!/usr/local/bin/perl
use DBI;
require "/proj/dsa/www/shared/perl/config.ph";
$dbh = DBI->connect($main::DB_DATASOU
23 matches
Mail list logo