Re: DBD::ADO - returning record count after update/insert

2002-11-28 Thread Jacqui Caren
On Fri, 08 Nov 2002 15:06:57 +, Simon Oliver wrote: > Jacqui Caren wrote: > > On Fri, 08 Nov 2002 09:28:43 +, Simon Oliver wrote: > > > > This is only true if RaiseError(s) is enabled and an exception was raised. > > > True. My apologies for the delay in responding. > > It is not true

Re: Subtle binding bug

2002-11-28 Thread Tony Bowden
On Wed, Nov 27, 2002 at 02:51:08PM -0500, Ronald J Kimball wrote: > > But what's the query being sent to MySQL? Why does it think that the > > value is the column? > I don't know how MySQL handles placeholders, so this is just a guess. It > may simply be interpolating the string 'nine' into the qu

Calling SQLServer Stored Procedures

2002-11-28 Thread Brien Pirkle
How can I execute a SQL Server stored proc from my Perl script? The Cheeta book (DBD::ODBC Driver pg 296) suggests using the following ODBC escape sequence: {call procedure1_name} Fine. But what's the rest of the syntax? My platform is NT, ActivePerl 633...database is SQLServer2000. TIA, Bri

DBI-Performace-Problem

2002-11-28 Thread Henning Meyer
Hello, I use Perl 5.6.0, DBI 1.30 and DBD-Oracle 1.12. While checking the performance, my Oracle-Tools discovered, that the Database does two prepares for every execute. My Perl-Code looks like this: my $cur=$dbh->prepare($call); die "Prepare-Error: $DBI::err\n$call\n$DBI::errstr\n" if ($DBI::e

ANNOUNCE: Class::DBI 0.90

2002-11-28 Thread Tony Bowden
Class::DBI is a simple database->object mapping system. Simply point it at your database, set up some classes to represent your tables, tell it the relationships between your tables, and let it handle all the 'simple' SQL for you (more complex queries can be written in SQL). [See http:/

Accessing catalog

2002-11-28 Thread alex . marino-almeida
Dears, I am trying access system views form Oracle catalog with script below : #!/usr/local/bin/perl -w $ENV{ORACLE_HOME}="/oracle/8.1.7"; $ENV{NLS_LANG}=" "; $ENV{NLS_DATE_FORMAT}=" "; use DBI; use CGI; my $dbh = DBI->connect( "dbi:Oracle:dbp2","sys","mypass"); my $sth = $dbh->prepare("select si

Re: Accessing catalog

2002-11-28 Thread Waldemar Zurowski
> my $sth = $dbh->prepare("select sid from v_$session"); Your problem is that you enclosed your SQL statement with double qoutes. This way, your table name becomes just 'v_' (as there is not any defined variable $session in your program.) See perl's error message and find what it is tring to tell

using qq

2002-11-28 Thread Vikram N
Hi , I am using DBI perl to connect to Oracle database. I am using "qq" against all queries submitted through prepare statement. I wanted to know if this is a good practice. Will this cause a problem in any situation ? Thanks and Regards, Vikram

Re: Calling SQLServer Stored Procedures

2002-11-28 Thread Roger Perttu
Brien Pirkle wrote: How can I execute a SQL Server stored proc from my Perl script? The Cheeta book (DBD::ODBC Driver pg 296) suggests using the following ODBC escape sequence: {call procedure1_name} Fine. But what's the rest of the syntax? From BOL: The ODBC CALL escape sequence for call

RE: Calling SQLServer Stored Procedures

2002-11-28 Thread Jeff Urlwin
> > How can I execute a SQL Server stored proc from my Perl script? > The Cheeta > book (DBD::ODBC Driver pg 296) suggests using the following ODBC escape > sequence: > > {call procedure1_name} > > Fine. But what's the rest of the syntax? Err, that is the syntax. If your procedure name is

Re: using qq

2002-11-28 Thread Waldemar Zurowski
W liƛcie z czw, 28-11-2002, godz. 15:48, Vikram N pisze: > Hi , > I am using DBI perl to connect to Oracle database. I am using "qq" against all >queries submitted through prepare statement. > I wanted to know if this is a good practice. Will this cause a problem in any >situation ? I would p

RE: Calling SQLServer Stored Procedures

2002-11-28 Thread Brien Pirkle
Jeff, So, assuming sp_foo takes no paramters, my whole script could be: # use DBI; my $dbh = DBI->connect('DBI:ODBC:OSTDB', 'user', 'password') or die "Couldn't connect to database: " . DBI->errstr; {call sp_foo} # Rgds, Brien

Re: Calling SQLServer Stored Procedures

2002-11-28 Thread Roger Perttu
Brien Pirkle wrote: Jeff, So, assuming sp_foo takes no paramters, my whole script could be: # use DBI; my $dbh = DBI->connect('DBI:ODBC:OSTDB', 'user', 'password') or die "Couldn't connect to database: " . DBI->errstr; {call sp_foo} #More like this:

Re: DBI-Performace-Problem

2002-11-28 Thread Tim Bunce
Try $dbh->prepare($call, { ora_check_sql => 0 }); (The underlying issue is either an Oracle bug or that one of the two parse steps counted isn't a real parse. DBD::Oracle does a 'describe only' execute at prepare() time and then a normal execute when execute() is called. The execute() should not c

Re: avoiding mysql corruptions on server-crashes

2002-11-28 Thread Moritz von Schweinitz
Tim Bunce wrote: On Tue, Nov 26, 2002 at 03:54:56PM -0600, Moritz von Schweinitz wrote: >Hi there, > >this is kinda OT, since i fear it's more of a mysql than dbi issue, but >here goes... > >the thing is that i have this long-running perlTk app. if i forcefully >bring my database-servre down (

Re: (Fwd) DBD::Oracle / alarm() problem

2002-11-28 Thread Jared Still
I've encountered a similar problem with alarm(). Here's a piece of working production code that succesfully uses alarm() with DBI. my $dbh = ''; # database connection will cause perl to 'die' # will just exit the eval block so we can check #

Re: Is ora_session_mode working for Oracle 9i?

2002-11-28 Thread Jared Still
You are attempting to login as SYSDBA. The SYSTEM account cannot do that normally. The requirements are: remote_login_passwordfile = EXCLUSIVE in the init.ora file. create a password file with orpwd utility grant SYSDBA to SYSTEM while logged into the database via sqlplus as SYSDBA. e.g. sql

Re: DBI-Performace-Problem

2002-11-28 Thread Jared Still
The first parse is a 'hard' parse. This is the parse that checks for existance of tables, privileges, and a bunch of other stuff I probably don't know about. The second parse is a 'soft' parse. It checks for existence of the SQL in the Oracle library cache. Oracle-Tools may not differentiate,