Oracle DBI connection working in command line but not in CGI

2001-09-05 Thread eddie iannuccelli
Hi, I have already saw similar questions but I think my pb is a bit different. I wrote a perl script that use an oracle 9i DB throug DBI DBD::Oracle. This script work fine when started from command line but fail when launched by apache with the folowing error (from the apache error log) : --

Re: selectall_hashref()

2001-09-05 Thread raptor
oops one additional explanation : selectall_arrayref returns array of hashes (for me) i.e : [ { field1name => field1value1, field2name => field2value1, field3name => field3value1 }, { field1name => field1value2, field2name => field2value2, field3name => field3value2 }

Re: selectall_hashref()

2001-09-05 Thread raptor
yep, sorry mistake , i didn't want to tell i need it in the DBI implementation :").. yep, i know i can do it in a normal way ... with fetches, just was wondering if there is a shortcut for this...what i need this for ? Building a HoH so that the designer via TT can generate select-box that that dy

DBI Build Problems

2001-09-05 Thread Satyanarayana, KJ
Can you please tell me what am I doing wrong in building DBI 1.20 ? make test is failing. Here are the logs for perl Makefile.PL, make, make test, make test TEST_VERBOSE=1 as well as Perl version info. Any help is greatly appreciated. Thanks. <> <> make.log perl.version

RE: DBI With Oracle & PL/SQL

2001-09-05 Thread timothy . helck
Jon, It's great that you asked this, because I've been wondering how to do it too. It's all in "Programming the Perl DBI" of course: page 126. Your intuition is correct, the PL/SQL stored procedures should be returning the value(s), not printing them. The PL/SQL guys at your company know how to

tables() won't accept "new" style parameters

2001-09-05 Thread Ivan Adzhubei
Hi, Am I missing something or indeed Tim forgot to actually implement the changes to calling convention for tables() and table_info() methods that are described in the docs for DBI-1.20? I tried passing parameters as a plain list of scalars (noted as "new" style) but it apparently does not work.

RE: Documentation of the "fetch" method

2001-09-05 Thread Wilson, Doug
> From: Rob McMillin [mailto:[EMAIL PROTECTED]] > > I was looking at the man page for DBI under DBI 1.20 and noticed that > the fetch method is not documented. Is there some reason for this? Its listed as an alias under fetchrow_arrayref. -Douglas Wilson

Documentation of the "fetch" method

2001-09-05 Thread Rob McMillin
I was looking at the man page for DBI under DBI 1.20 and noticed that the fetch method is not documented. Is there some reason for this? -- http://www.pricegrabber.com | Dog is my co-pilot.

RE: DBI With Oracle & PL/SQL

2001-09-05 Thread Dan Horne
A simple, but ugly solution call_function.sql: set head off set pages off set serverout on size 100 exit and then in your perl script $result= `sqlplus -s $AO \@$SQL/tr_get_batch_no.sql`; where $AO is your user/password combo. Alternatively, you may be able to pass back a collection ty

Solved: DBD::Oracle crashes IRIX server hard

2001-09-05 Thread Ivan Adzhubei
Hi! We finally fixed the problem today and of course Tim was right -- it was IRIX system bug that caused the crashes, not the DBD::Oracle fault by no means. After a long and winding debugging session with SGI support people they finally sent us another IRIX patch, after applying which all of DBD

interbase and BLOB's

2001-09-05 Thread Gerd König
Hi, first of all can somebody give me the syntax to connect to interbase with DBD::Interbase. I read many articles but I haven't found a good example. Path to db: /opt/interbase/test.gdb Host: 192.168.0.25 user: xx password: yy perhaps something like: DBI->connect("DBD::Interbas

RE: selectall_hashref()

2001-09-05 Thread Wilson, Doug
Forgot the '$sth->execute;'. Whoops. I'm sure you'd figure it out eventually anyway though :) > -Original Message- > From: Wilson, Doug [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, September 05, 2001 10:12 AM > To: 'Sterin, Ilya'; 'raptor '; '[EMAIL PROTECTED] ' > Subject: RE: selectall

RE: selectall_hashref()

2001-09-05 Thread Sterin, Ilya
Now I see, but that is specific to your implementation, so I don't see the use/need for it in standard DBI interface. Anyone? Ilya -Original Message- From: Wilson, Doug To: Sterin, Ilya; 'raptor '; '[EMAIL PROTECTED] ' Sent: 9/5/01 11:11 AM Subject: RE: selectall_hashref() > From: ra

Re: date/time system format

2001-09-05 Thread wsheldah
This depends heavily on your particular database. You should probably check your database's docs, or a mailing list specific to your database if there is one. In some databases, "date" may be a reserved word and therefore not eligible to be used as a field name. Do you want your field to have

RE: How to update records?

2001-09-05 Thread Sterin, Ilya
I would advise you to refer to a standard SQL book as well as a SQL specific newsgroup at groups.google.com. This is a DBI/DBD mailing list and your question is off topic. Thanks. Ilya Sterin -Original Message- From: Nguyen, David M To: [EMAIL PROTECTED] Sent: 9/5/01 8:52 AM Subject: H

RE: selectall_hashref()

2001-09-05 Thread Wilson, Doug
> From: raptor > I want a litle more extended sytax for selectall_hashref(), > or if u can > tell > me how the achieve this : > > my $Query = qq{SELECT field1, field2, field3}; > my $res = $dbh->selectall_hashref($Query, {field1=>1, > field2=>1}, %attr) > so as a result i get the following Ho

date/time system format

2001-09-05 Thread Nguyen, David M
How do I create a a field to use system date, is the code below correct? What I want is the system will generate system date/time for me automactically without user's input. SQL> create table calllogtest (date sysdate(8)); Thanks, David

RE: selectall_hashref()

2001-09-05 Thread Sterin, Ilya
OK, I'm lost. Can you tell me (us) what exactly you are trying to accomplish and why. Right now I can't figure this out, but maybe someone else can shed some light. Why is this used as an argument {field1=>1, field2=>1} and what is accomplished with this... $$res{field1}{field2} = $field3;

RE: Why and How?

2001-09-05 Thread Sterin, Ilya
Because if you enter the same characters in the query run in Oracle it will also generate an error. You must either use quote() or use placeholders, both of which escape the needed characters. Ilya -Original Message- From: Nguyen, David M To: [EMAIL PROTECTED] Sent: 9/5/01 9:45 AM Subje

RE: Why and How?

2001-09-05 Thread Wilson, Doug
> From: Nguyen, David M [mailto:[EMAIL PROTECTED]] > Why do I get error message "Internal Error" from the web > browser everytime I > input character ( ' ) or ( " ) into comment text field after > pressing SUMMIT > button to summit the form. I use Oracle database and DBI. > How do I fix > t

selectall_hashref()

2001-09-05 Thread raptor
hi, I want a litle more extended sytax for selectall_hashref(), or if u can tell me how the achieve this : my $Query = qq{SELECT field1, field2, field3}; my $res = $dbh->selectall_hashref($Query, {field1=>1, field2=>1}, %attr) so as a result i get the following HoH : $$res{field1}{field2} = $fi

Why and How?

2001-09-05 Thread Nguyen, David M
Please help, Why do I get error message "Internal Error" from the web browser everytime I input character ( ' ) or ( " ) into comment text field after pressing SUMMIT button to summit the form. I use Oracle database and DBI. How do I fix this? Thanks, David

RE: How to update records?

2001-09-05 Thread Richard Chiswell
On Wednesday, 5th September 2001 at 3:52pm, David M Nguyen wrote: > I am developing a web form for users to update their tickets using Oracle > and DBI. My question is what SQL command do I use to update records? I > want to keep the old records and just want to append new updates > after. If >

How to update records?

2001-09-05 Thread Nguyen, David M
Hi all, I am developing a web form for users to update their tickets using Oracle and DBI. My question is what SQL command do I use to update records? I want to keep the old records and just want to append new updates after. If I use "update" command it will replace old records with new one th

Re: DB2 and CGI

2001-09-05 Thread Ricardo Derbes
Hi I think the problem is that you are not setting the instance of the DB2 in your perl script. I do with a line like this: $ENV{'DB2INSTANCE'}='db2inst1' ; # Or whatever your instance name is... note the curly braces, not parentheses! ... #and later you do the connection with a line like th

w2k odbc connection to DB on AIX

2001-09-05 Thread cchupela
Hello, I am attempting to connect to a database (Tivoli Storage Manager) on AIX 4.3 using perl/DBI/ODBC from win2k using the following code: (system DSN configured for server1 on the box running the script) use DBI; $dsn = 'dbi:ODBC:server1'; $uid = 'xx'; $pwd = 'xx'; $dbh

Re: tables attribute

2001-09-05 Thread Martin Hesse
Martin Hesse wrote: > > Hello All, > > When I call the tables attribute on my Oracle-DB I get an Error > ORA-00942: table or view does not exist. I connect as user sys when > calling this. I attached dbi->trace(4) of that call. Thanks any advice. > > Martin > Solved that. Some views disappear

RE: DB2 and CGI

2001-09-05 Thread gordon . dewis
It sounds like your DB2 environment variables are not being passed from the webserver to the CGI. You'll need to modify your Apache config to explicitly pass the variables DB2 requires. I don't recall specifically which ones they are. -Original Message- From: James Gardner [mailto:[EMAI

Re: Character conversion problem

2001-09-05 Thread Jim Lynch
Hi, everyone. Thanks for all the replies. I found that setenv NLS_LANG AMERICAN_AMERICA.WE8ISO8859P1 is what worked for me. Thanks to all who helped, Jim. Jim Lynch wrote: > > I suspect this isn't a DBI problem, but I also find this group has a > really good grasp on databases in general,

DBI With Oracle & PL/SQL

2001-09-05 Thread Jon Williams
Have been using DBI with MySQL & Oracle for some time now. Recently, the powers that be (i.e my bosses) decided to use PL/SQL stored procedures for some of our rather complex queries. The PL/SQL guys are writing the query results to DBMS_OUTPUT. I cannot get to the query results via standard DB

RE: Character conversion problem

2001-09-05 Thread Oleg Mechtcheriakov
It looks like Your db has wrong character set. Cannot recall the link now, but here is an excerption which worked for me: > Document ID: 13856.1 Subject: CHANGING DATABASE CHARACTER SET Author: ETAFEEN Last Revision Date: 15 August 1995 This a

Character conversion problem

2001-09-05 Thread Jim Lynch
I suspect this isn't a DBI problem, but I also find this group has a really good grasp on databases in general, so here goes. I'm doing a select on a table (Oracle 8) that contains a Swedish name, SØREN, and when I get it back, the second character is returned as a question mark. Same thing happ

DBI and DBD module

2001-09-05 Thread Cheng, David
Hi, I tried to write a perl script to shutdown and startup database remotely from win 2000 client to Unix server machine with oracle database 8.1.7. Does your DBI and DBD work for oracle 8.1.7. Thanks. David Y Cheng Database Administrator La Jollar Laboratories 3377 North Torry Pines Court, Su

RE: Please remove bbinkley@tradebeam.com from the dbi-users@pearl.org group

2001-09-05 Thread Troy Roberts
-Original Message- From: Jim Lynch Sent: Tue 9/4/2001 10:35 AM To: [EMAIL PROTECTED] Cc: dbi-users Subject: Re: Is there an easy way to determine where this... OK, thanks. I thought the hash bein

Old version of DBI, DBD modules

2001-09-05 Thread Medha Atré
Hello, I want to use DBI, DBD-mysql modules with Redhat 6.2, but the current avaliable version of DBI (1.20) and DBD-mysql (2.0902) says that it requires Redhat 7.1. I can neither use Redhat 7.1 nor upgrade Perl version coming with Redhat 6.2 for some specific testing purposes. Due to this, the m