Re: DBIx::DBH - Perl extension for simplifying database connections

2004-12-02 Thread Tim Bunce
On Thu, Dec 02, 2004 at 08:53:38AM +0100, Cosimo Streppone wrote: Tim Bunce wrote: I know what it does, I'm trying to find real examples that demonstrate why people think it's needed. Nick has provided a good one. Any others? Something like DBIx::DBH is in use in our organization. This is

Re: Apparent DBD::Oracle 1.16 unicode regression

2004-12-02 Thread Tim Bunce
On Wed, Dec 01, 2004 at 09:00:23PM -0500, Lincoln A. Baxter wrote: Is there a change in 1.16 that would cause this to become an issue, The Changes file (which I presume you read before upgrading) says This release has major changes to Unicode support. See below. and Added automatic support

Re: DBIx::DBH - Perl extension for simplifying database connections

2004-12-02 Thread Tony Bowden
On Thu, Dec 02, 2004 at 03:43:56AM -, Greg Sabino Mullane wrote: It also seems like an awful lot of overhead to make a module where a couple of lines in the script will suffice. I don't really have an opinion on the module in question, but this logic seems flawed to me. I don't see how a

Re: DBI script help

2004-12-02 Thread Peter Hircock
Hello To send mail from the command line, I use to use elm which would allow me to insert the files as attachments. But now, I would suggest using one of the CPAN mail libraries to mail directly from the perl script. MIME::Lite would do the trick and you could specify the encoded file as

Problem to fetch SQL Server SELECT ... COMPUTE SUM(col1)

2004-12-02 Thread Marc TRAVAILLE
Good evenning, I create a calculate Select on SQL Server: SELECT col1, col2, col3 FROM table1, table2 WHERE . ORDER BY col1, col2 COMPUTE SUM(col1) With SQL Server the result is good Line1 Line2 Line3 SUM Line1 Line2 SUM When I try with Perl and ODBC, I could only fetch first line

Re: Apparent DBD::Oracle 1.16 unicode regression

2004-12-02 Thread Jesse Vincent
Lincoln, Sorry about that... What is RT? RT is an issue tracking system. http://bestpractical.com/rt/. It supports MySQL, PostgreSQL, Oracle, SQLite and is fairly close to having reasonable support for Sybase. The bug I'm describing isn't something I've managed to duplicate in-house.

RE: DBIx::DBH - Perl extension for simplifying database connectio ns

2004-12-02 Thread Orton, Yves
It'll always come down to the issue of why not store complete DSNs? and so far that's not been well covered by the feedback I've got. Duplication of data in multiple places is the answer I think. The more DSN strings you have the more needs to be changed later on, and the bigger the chance

Re: DBIx::DBH - Perl extension for simplifying database connections

2004-12-02 Thread John Siracusa
On Wed, 1 Dec 2004 18:39:00 +, Tim Bunce [EMAIL PROTECTED] wrote: FWIW, the reason I'm digging here is because I agree there may be some value in the DBI supporting something along these lines, but I need a better understanding of the underlying issues. More real- world examples would

Re: DBIx::DBH - Perl extension for simplifying database connections

2004-12-02 Thread Mark Stosberg
On Wed, Dec 01, 2004 at 06:39:00PM +, Tim Bunce wrote: FWIW, the reason I'm digging here is because I agree there may be some value in the DBI supporting something along these lines, but I need a better understanding of the underlying issues. More real- world examples would help. I

Re: DBIx::DBH - Perl extension for simplifying database connections

2004-12-02 Thread Henri Asseily
On Dec 1, 2004, at 10:39 AM, Tim Bunce wrote: On Wed, Dec 01, 2004 at 09:56:01AM -0500, John Siracusa wrote: On Wed, 1 Dec 2004 09:46:24 +, Tim Bunce [EMAIL PROTECTED] wrote: Do you generally pass URLs around as a string or broken up into a hash? If they had different formats for different

Re: DBIx::DBH - Perl extension for simplifying database connections

2004-12-02 Thread Ricardo SIGNES
* Tim Bunce [EMAIL PROTECTED] [2004-12-01T13:27:00] On Wed, Dec 01, 2004 at 10:09:55AM -0500, Ricardo SIGNES wrote: db_driver: ODBC db_user: kibo db_pass: grep db_name: users Why not store something like this?: db_user: kibo db_pass: grep db_dsn: dbi:...:... Well,

Re: DBIx::DBH - Perl extension for simplifying database connections

2004-12-02 Thread Nicholas Clark
On Wed, Dec 01, 2004 at 09:46:24AM +, Tim Bunce wrote: Do you generally pass URLs around as a string or broken up into a hash? Personally I've not written much code to handle URLs. But work code has them split into hashes, built from config files where protocol, server, port, path etc are

Re: Apparent DBD::Oracle 1.16 unicode regression

2004-12-02 Thread Jesse Vincent
On Wed, Dec 01, 2004 at 06:59:18PM -0500, Lincoln A. Baxter wrote: On Wed, 2004-12-01 at 12:18 -0500, Jesse Vincent wrote: The bug I'm describing isn't something I've managed to duplicate in-house. Everyone who's hitting it is running perl 5.8.3 or newer (Some are running 5.8.5).

Re: DBIx::DBH - Perl extension for simplifying database connections

2004-12-02 Thread Cosimo Streppone
Tim Bunce wrote: I know what it does, I'm trying to find real examples that demonstrate why people think it's needed. Nick has provided a good one. Any others? Something like DBIx::DBH is in use in our organization. This is because every sql source (meaning database table) is accessed with

Re: DBIx::DBH - Perl extension for simplifying database connections

2004-12-02 Thread Cosimo Streppone
Cosimo Streppone wrote: Tim Bunce wrote: I know what it does, I'm trying to find real examples that demonstrate why people think it's needed. Nick has provided a good one. Any others? Something like DBIx::DBH is in use in our organization. This is because every sql source (meaning database table)

RE: [dbi] Problem to fetch SQL Server SELECT ... COMPUTE SUM(col1)

2004-12-02 Thread Martin J. Evans
Look at odbc_more_results in DBD::ODBC and the same in the test cases in the subdir called t when DBD::ODBC is unpacked. Martin -- Martin J. Evans Easysoft Ltd, UK Development On 01-Dec-2004 Marc TRAVAILLE wrote: Good evenning, I create a calculate Select on SQL Server: SELECT col1,

Re: DBIx::DBH - Perl extension for simplifying database connections

2004-12-02 Thread Michael Peppler
On Thu, 2004-12-02 at 08:53, Cosimo Streppone wrote: Tim Bunce wrote: I know what it does, I'm trying to find real examples that demonstrate why people think it's needed. Nick has provided a good one. Any others? Something like DBIx::DBH is in use in our organization. This is because

Re: Connecting to a remote server

2004-12-02 Thread Hardy Merrill
Michael, note here that it's been years since I used MySQL, but I think I remember MySQL authentication being host based. That's not the right term, but connecting locally with mysql user user1 is *NOT* the same as connecting remotely to the same server with mysql user user1. There is a way to

Re: Connecting to a remote server

2004-12-02 Thread David N Murray
Pardon my jumping into the middle of this thread without reading the previous, but this problem is well-documented (check google). With MySQL 4.1, you can't connect using DBI. The authentication method changed and the DBD::MySQL module hasn't caught up yet. I went through this a couple of weeks

Re: Connecting to a remote server

2004-12-02 Thread Ron Savage
On Thu, 2 Dec 2004 08:14:12 -0500 (EST), David N Murray wrote: Hi Michael  Pardon my jumping into the middle of this thread without reading  the previous, but this problem is well-documented (check google). Yep. Sounds like the OLD_PASSWORD stuff has not been done on the remote host:

DBI and ALTER SESSION bug?

2004-12-02 Thread Stacy.Mader
Greetings all; A question regarding setting NLS_DATE_FORMAT and getting DBI to obey it... With the code below, the statement fails to retrieve data although I know it is there. However, if I modify the SQL statement to the following: SELECT * FROM POSITIONS WHERE TO_CHAR(START,'DD-MM-') =

Re: DBI and ALTER SESSION bug?

2004-12-02 Thread Ravi Kongara
Stacy, Alter session should work, i use it in my script. Try with double quotes instead of single quotes in your code. $dbh-do(qq{ALTER SESSION SET NLS_DATE_FORMAT = 'DD-MM-'}); regs, Ravi [EMAIL PROTECTED] wrote: Greetings all; A question regarding setting NLS_DATE_FORMAT and getting DBI

RE: DBI and ALTER SESSION bug?

2004-12-02 Thread Stacy.Mader
Hi Ravi; Thanks for your reply... Double quotes didn't solve the problem. :( I notice however that LIKE produces what I want: ALTER SESSION SET NLS_DATE_FORMAT = 'DD-MM-' SELECT * FROM $table WHERE START LIKE '08-09-1999' A bit more testing with the statement: SELECT START FROM $table

RE: DBI and ALTER SESSION bug?

2004-12-02 Thread Reidy, Ron
Show us your Purl code. I am suspicious of you use of a variable for a table name. Also, if the column 'START' is a DATE-is type of column and your bind variable does not contain a time component, use the TRUNC() function on 'START'. -- Ron Ready Lead DBA Array BioPharma, Inc. -Original

Re: DBI and ALTER SESSION bug?

2004-12-02 Thread Ravi Kongara
Your START date must be having time component other than just 00:00:00. So try using TRUNC function. It will solve ur problem.I just tested it. $sth = $dbh-prepare(qq{SELECT * FROM $table WHERE trunc(START) = ?}); regs, Ravi [EMAIL PROTECTED] wrote: Hi Ravi; Thanks for your reply... Double

RE: DBI and ALTER SESSION bug?

2004-12-02 Thread Stacy.Mader
I'm pretty sure the table variable name isn't the problem :) The column 'START' is of type DATE. Surely if one sets the date format with NLS_DATE_FORMAT, you SHOULDN'T need to use other functions like TRUNC? Stacy... -Original Message- From: Reidy, Ron [mailto:[EMAIL PROTECTED] Sent:

Re: DBIx::DBH - Perl extension for simplifying database connections

2004-12-02 Thread Ken Williams
On Dec 1, 2004, at 3:48 AM, Tim Bunce wrote: I know what it does, I'm trying to find real examples that demonstrate why people think it's needed. Nick has provided a good one. Any others? Suppose someone's creating a GUI app (Perl/Tk, etc.) in which the end user fills in the server, port, user,

Re: DBIx::DBH - Perl extension for simplifying database connections

2004-12-02 Thread Austin Schutz
On Thu, Dec 02, 2004 at 09:52:20PM -0600, Ken Williams wrote: On Dec 1, 2004, at 3:48 AM, Tim Bunce wrote: I know what it does, I'm trying to find real examples that demonstrate why people think it's needed. Nick has provided a good one. Any others? Suppose someone's creating a GUI app

Re: DBIx::DBH - Perl extension for simplifying database connections

2004-12-02 Thread Jonathan Leffler
On Thu, 2 Dec 2004 03:43:56 -, Greg Sabino Mullane [EMAIL PROTECTED] wrote: This seems to be a solution in search of a problem. With the exception of perhaps port, host, and database database - Informix doesn't directly use host or port. (That's the Informix DBMS that doesn't support

Re: DBIx::DBH - Perl extension for simplifying database connections

2004-12-02 Thread Sam Vilain
Ken Williams wrote: On Dec 1, 2004, at 3:48 AM, Tim Bunce wrote: I know what it does, I'm trying to find real examples that demonstrate why people think it's needed. Nick has provided a good one. Any others? Suppose someone's creating a GUI app (Perl/Tk, etc.) in which the end user fills in the