Re: MS Access

2002-06-25 Thread Brian Bruns
Actually since MDB Tools is also an ODBC driver, you could probably use DBD::ODBC as well. Although to be honest, the SQL engine and ODBC driver have a number of nasty bugs. I haven't tried this arrangement myself, so buyer beware. Brian On 25 Jun 2002, Jeff Zucker wrote: > Orlando Andico

Re: Inserting formatted Date

2002-06-25 Thread Ronald J Kimball
On Tue, Jun 25, 2002 at 02:09:56PM -0400, Kipp, James wrote: > > > > Oracle stores the date as a number. This works out as the > > number of seconds > > from a significant date (in Oracle's mind). Therefore, you > > must send it as > > a date (or number). The to_char function returns the cha

RE: Inserting formatted Date

2002-06-25 Thread Kipp, James
yes, i think i will keep it simple and just use SYSDATE as Ronald suggested Thanks both for your help > -Original Message- > From: Powell, Bruce [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, June 25, 2002 2:18 PM > To: 'Kipp, James'; Powell, Bruce; DBI-Users > Subject: RE: Inserting formatt

RE: Inserting formatted Date

2002-06-25 Thread Powell, Bruce
IF you insert into a table using the to_date function, Oracle uses that function to make the calculation and converts it to a number. So, if you used the function to_date('01-01-2002', 'dd-mm-') this would be the same as to_date('Jan 01, 2002', 'Mon dd, '). If you start adding times in t

RE: Inserting formatted Date

2002-06-25 Thread Kipp, James
> > The DATE datatype in Oracle is stored in a special internal format. > (Specifically, it's a floating point number representing the > number of days > since some point in time.) As I said before, the formatting > only comes > into play when you retrieve the value, not when you store it. >

Re: MS Access

2002-06-25 Thread Keith Clay
With the freetds drivers you can connect directly from solaris to an MS-Access database. I have done it many times and if you search on google there is a webpage that tells how to do it. keith Jeff Zucker wrote: > Orlando Andico wrote: > >> It IS possible to read MSAccess files on a Linux bo

Re: Inserting formatted Date

2002-06-25 Thread Ronald J Kimball
On Tue, Jun 25, 2002 at 01:19:34PM -0400, Kipp, James wrote: > > > > What is the data type for the field into which you are > > inserting the date? > > If it's a DATE field, you do the formatting when you retrieve > > the value, > > not when you set it. If it's not a DATE field, it should be.

RE: Inserting formatted Date

2002-06-25 Thread Kipp, James
> > Oracle stores the date as a number. This works out as the > number of seconds > from a significant date (in Oracle's mind). Therefore, you > must send it as > a date (or number). The to_char function returns the character > representation of the number stored in the field. so then it do

Re: Inserting formatted Date

2002-06-25 Thread Ronald J Kimball
On Tue, Jun 25, 2002 at 11:58:11AM -0500, [EMAIL PROTECTED] wrote: > I think the problem here is a type problem. The to_char is returning a > char type and the column is a date type. To_char returns a character > string and that's failing on the insert due to the table requiring a > date type.

RE: Inserting formatted Date

2002-06-25 Thread Powell, Bruce
Oracle stores the date as a number. This works out as the number of seconds from a significant date (in Oracle's mind). Therefore, you must send it as a date (or number). The to_char function returns the character representation of the number stored in the field. -Original Message- Fro

RE: Inserting formatted Date

2002-06-25 Thread Kipp, James
> > I think the problem here is a type problem. The to_char is > returning a > char type and the column is a date type. To_char returns a character > string and that's failing on the insert due to the table requiring a > date type. Without knowing exactly what database you are > using I can

Re: MS Access

2002-06-25 Thread Jeff Zucker
Orlando Andico wrote: > It IS possible to read MSAccess files on a Linux box. > http://mdbtools.sourceforge.net/ Hmm, I had no idea that was available, forget my advice about saving the Access files as CSV. At first glance it looks like it would be trivial to build an AnyData::Format::Access

RE: Inserting formatted Date

2002-06-25 Thread Kipp, James
> > What is the data type for the field into which you are > inserting the date? > If it's a DATE field, you do the formatting when you retrieve > the value, > not when you set it. If it's not a DATE field, it should be. the data type is 'date'. I wanted to format it as i insert because the f

RE: Problem: installation DBI in AIX 4.3.3

2002-06-25 Thread Gordon . Dewis
It should just be: "use DBI;" -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Tuesday, June 25, 2002 10:55 AM To: [EMAIL PROTECTED] Subject: Problem: installation DBI in AIX 4.3.3 Hello I'm trying to install DBI (version 1.28) in a AIX 4.3.3. platform and fa

DBD::ODBC: Numeric Value out of range

2002-06-25 Thread Stefan Mueller
Hello, last week I have installed DBD::ODBC Version 0.41 on my linux box. After that time I get SQL Error 22003: numeric value out of range. Before I have used Version 0.38 and everything was ok. why do I get an error now? Thanks in advance, Stefan Mueller

RE: Inserting formatted Date

2002-06-25 Thread Gordon.Rhea
I think the problem here is a type problem. The to_char is returning a char type and the column is a date type. To_char returns a character string and that's failing on the insert due to the table requiring a date type. Without knowing exactly what database you are using I can't give you much h

Re: MS Access

2002-06-25 Thread Orlando Andico
On 25 Jun 2002, Jeff Zucker wrote: ... > Save the MS-Access file as CSV (Comma Separated Values), then on the > Unix box, use DBD::CSV to read it directly, or else use an import > routine for e.g. PostgresSQL or MySQL to import the CSV file into a > different RDBMS and use the appropriate DBD to r

Re: MS Access

2002-06-25 Thread Orlando Andico
It IS possible to read MSAccess files on a Linux box. http://mdbtools.sourceforge.net/ Well I haven't really tried it, but I think basic table reads and export will work. You have to have a copy of the .MDB file on your UNIX filesystem though, which precludes its being used "live" by MSAccess

Re: MS Access

2002-06-25 Thread Jeff Zucker
Erick Nelson wrote: > Ya, I saw that, I was just hoping that there was a way to do it without involving > a Win32 box. Save the MS-Access file as CSV (Comma Separated Values), then on the Unix box, use DBD::CSV to read it directly, or else use an import routine for e.g. PostgresSQL or MySQL t

Re: Inserting formatted Date

2002-06-25 Thread Ronald J Kimball
On Tue, Jun 25, 2002 at 12:41:05PM -0400, Kipp, James wrote: > This works fine: > my $sth = $dbh->prepare( "INSERT INTO stats VALUES (SYSDATE,?,?,?,?)" ) > or die "Cannot prepare SQL statements from $DBI::errstr\n"; > > however if i try to format it like: > my $sth = $dbh->prepare( "INSER

Re: How I can eliminate the double quotes when I read a csvfile?

2002-06-25 Thread Jeff Zucker
TIBA, LIVIA wrote: > Thanks Jeff, > > I already tried that, because I read about the default value for > quote_char, escape_char but doesn't work. It works for me. Please try this script which creates the data file you described and then reads it with DBD::CSV. It works as it should for m

Inserting formatted Date

2002-06-25 Thread Kipp, James
This works fine: my $sth = $dbh->prepare( "INSERT INTO stats VALUES (SYSDATE,?,?,?,?)" ) or die "Cannot prepare SQL statements from $DBI::errstr\n"; however if i try to format it like: my $sth = $dbh->prepare( "INSERT INTO stats VALUES (to_char(SYSDATE, 'Dy DD-Mon- HH24:MI'),?,?,?,?)"

Re: MS Access

2002-06-25 Thread Erick Nelson
Ya, I saw that, I was just hoping that there was a way to do it without involving a Win32 box. My sysadmins downstairs are Sun Solaris bigots and cannot (will not?) tolerate any kind of Win32 servers in our production environment. Bart Lateur wrote: > On Tue, 25 Jun 2002 08:41:01 -0700, Erick Ne

RE: MS Access

2002-06-25 Thread Lasker, Sholom Y [IT]
I've connected my Unix machine running my Perl code to a MS Access database using the DBI proxy modules, and all works well except that I can have single treaded connections to the database only. This limits the size of the application that you can support. Currently I have a script in place that

Re: HELP ME !! Can't locate object method "connect" via package "DBI"

2002-06-25 Thread Bart Lateur
On Tue, 25 Jun 2002 11:55:36 -0400, [EMAIL PROTECTED] wrote: >Can't load module DBI, dynamic loading not available in this perl. This means you have a statically compiled perl, without support for dynamic loading. It should help to recompile perl. As the error message goes on, you basically have

Re: MS Access

2002-06-25 Thread Bart Lateur
On Tue, 25 Jun 2002 08:41:01 -0700, Erick Nelson wrote: >Thanks, >But this is not being done on a Win32 box. Does anybody know how I go about >getting an ODBC driver for Sun Solaris ? You should have loked around a little on the URL of the FAQ's that you got. It's all there. For example:

Re: How I can eliminate the double quotes when I read acsvfile?

2002-06-25 Thread TIBA, LIVIA
Thanks Jeff, I already tried that, because I read about the default value for quote_char, escape_char but doesn't work. I can't figure out why. If I don't set quote_char at all, all my fields (MSUID, ServiceType,...) are not recognize individual and I'll have only one filed from all together. I

Ejecutable en perl

2002-06-25 Thread GermanMarambio
Hola: He visto tu mensaje de ayuda acerca de la creacion de ejecutables en perl te comento que yo he utilizado el perlcc y funciona bien siempre y cuando no utilice la libreria DBI. ahora me encuentro haciendo un sistema importante que requiere la libreria DBI tu sabes algo al respecto acerca de

HELP ME !! Can't locate object method "connect" via package "DBI"

2002-06-25 Thread GermanMarambio
Hi, i did modify the source code. I change use for require, Now appears the following message: Can't load module DBI, dynamic loading not available in this perl. (You may need to build a new perl executable which either supports dynamic loading or has the DBI module statically linked into it

RE: MS Access

2002-06-25 Thread Mark Charshaf
Below is a reply I made to someone wanted to access Oracle on NT from a Linux box (client perl pgm). The same situation could apply to accessing MS Access from a Unix or Linux machine. Why fool around with installing ODBC drivers on Unix/Linux when you have a great pass-through facility like DBI:P

Re: MS Access

2002-06-25 Thread Erick Nelson
Thanks, But this is not being done on a Win32 box. Does anybody know how I go about getting an ODBC driver for Sun Solaris ? Bart Lateur wrote: > On Mon, 24 Jun 2002 16:22:38 -0700, Erick Nelson wrote: > > >I've just spent the last 15 minutes looking at CPAN for a module to > >query a MS Acces

DBD::ADO and DBD::ODBC with foxpro driver problem

2002-06-25 Thread Simon Oliver
I need to query a foxpro database (3rd party software). In the past I have had no success with DBD::ODBC accessing foxpro databases (causes an application error). So I used DBD::ADO instead. However, with the latest DBD::ADO (2.5) the script dies during connect(). Here's the snippet I'm using

Re: Small bug in DBD::Oracle-1.12/Oracle.xs

2002-06-25 Thread Tim Bunce
On Tue, Jun 25, 2002 at 01:38:05PM +0100, Sreeji K Das wrote: > Hi > Oracle.xs has: > I32 > constant(name=Nullch) > char *name > PROTOTYPE: > > The above defines an empty prototype, so the following > fails: > perl -MDBD::Oracle -e 'print > DBD::Oracle::ORA_RSET(10), "\n";' > Too many arg

Re: Book Recommendation?

2002-06-25 Thread Tim Bunce
On Tue, Jun 25, 2002 at 09:45:35AM -0500, Paul DuBois wrote: > > Most of MySQL and Perl for the Web is fairly database-independent, > in the sense that its discussion of DBI isn't tied specifically > to MySQL. On the other hand, it's an application-writing book, not > a reference book. If you'r

Re: How I can eliminate the double quotes when I read a csv file?

2002-06-25 Thread Jeff Zucker
TIBA, LIVIA wrote: > my $dbh = DBI->connect("DBI:CSV:"); > $dbh->{'csv_tables'}->{'PM_Report'} = { > 'eol' => "\n", > 'sep_char' => "|", > 'quote_char' => undef, > 'escape_char' => undef, > 'file' => './PM_Report' >}; Remove that and use this instead:

Problem: installation DBI in AIX 4.3.3

2002-06-25 Thread Manuel . Galan
Hello I'm trying to install DBI (version 1.28) in a AIX 4.3.3. platform and fail when I'm executing the command perl makefile.pl. The error output show Can't locate DBI/DBD.pm in @INC (@INC contains: lib /usr/opt/perl5/lib/5.00503/aix /usr/opt/perl5/lib/5.00503 /usr/opt/perl5/lib/site_perl/5.005

Re: Book Recommendation?

2002-06-25 Thread Paul DuBois
At 0:03 -0700 6/25/02, Will wrote: >Greets Folks, > >I wrote in yesterday as per the author of the DBI >module, but the documentation i have found really >doesnt seem sufficient for learning the module... > >Is there a book I should buy for this? I checked ou >this book: > >http://www.amazon.com/

How I can eliminate the double quotes when I read a csv file?

2002-06-25 Thread TIBA, LIVIA
Hello, I'm relative new in DBI... My question is how I can eliminate the double quotes when I read a csv file which I want to use it to create a database tabel? I have a code like this: require DBI; use strict; my $dbh = DBI->connect("DBI:CSV:"); $dbh->{'csv_tables'}->{'PM_Report'} = { 'e

Re: Naive questions about speed

2002-06-25 Thread Felix Geerinckx
on Tue, 25 Jun 2002 13:36:03 GMT, [EMAIL PROTECTED] (Rory Campbell-Lange) wrote: > Although the Director application (sited on about 8 machines) > shouldn't tax the modest resources of our server, I am interested > in knowing if there are some simple ways of speeding up queries. > My particular

Re: Naive questions about speed

2002-06-25 Thread Rory Campbell-Lange
And of course, using DBI. Sorry for the omission. Rory On 25/06/02, Rory Campbell-Lange ([EMAIL PROTECTED]) wrote: > I've written a set of modules for providing xml content over http to a > Director application. At present I am using CGI.pm, normal Apache and > postgresql on Linux (Debian). --

Naive questions about speed

2002-06-25 Thread Rory Campbell-Lange
I've written a set of modules for providing xml content over http to a Director application. At present I am using CGI.pm, normal Apache and postgresql on Linux (Debian). Although the Director application (sited on about 8 machines) shouldn't tax the modest resources of our server, I am intereste

Small bug in DBD::Oracle-1.12/Oracle.xs

2002-06-25 Thread Sreeji K Das
Hi Oracle.xs has: I32 constant(name=Nullch) char *name PROTOTYPE: The above defines an empty prototype, so the following fails: perl -MDBD::Oracle -e 'print DBD::Oracle::ORA_RSET(10), "\n";' Too many arguments for DBD::Oracle::ORA_RSET at -e line 1, near "10)" I know I'm not supposed to

Re: Error using on Win32

2002-06-25 Thread Felix Geerinckx
on Mon, 24 Jun 2002 21:35:35 GMT, [EMAIL PROTECTED] (Pierre Rodrigues) wrote: > How can I correct the following error: > [error code snipped] > I have it on my Perl scripts running on a WinNT with all required > modules: DBI and DBD-mysql Show us your code. -- felix

Re: Book Recommendation?

2002-06-25 Thread Andy Duncan
Hi Will, > Is there something a little more concise? I've got > Paul DuBois' book MySQL and Perl for the Web, but I > feel like maybe I shoudl focus more on the DBI module > itself before going too much further into DuBois' > book. What would you folks recommend? I would thoroughly recommend

Re: Problem with pages of result

2002-06-25 Thread Tomas Eriksson
Forgot to say that is Perl/Linux -> Windows DB machine - Original Message - From: "Tomas Eriksson" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, June 25, 2002 12:55 PM Subject: Problem with pages of result Hi. We are working with Postgres and MSSQL in my company. I see so

Problem with pages of result

2002-06-25 Thread Tomas Eriksson
Hi. We are working with Postgres and MSSQL in my company. I see some problems with the different techniques, Postgres has SQL for limit result (with more pages) and MS has these functions in ADO-recordset. In Postgres (what I know) I have to search twice to get the count of pages and limit the

Re: [Poop-group] ANNOUNCE: Class::DBI 0.89

2002-06-25 Thread william ross
tony, i notice that defining a relationship with might_have doesn't add a column to $class->__hasa_columns. is that something you're likely to change? it's enormously useful for me to be able to define relationship columns which might not be occupied - eg person foo might_have a mugshot in th

RE: strange error with using $db->do

2002-06-25 Thread Reddy Thalakola
I have cron script that runs fine on a bsd machine, but returns this output on the linux machine. i have version 1.21 on the linux machine. DBD::Oracle::db do failed: ORA-0: normal, successful completion (DBD SUCCESS_WITH_INFO: OCIStmtExecute) at /home/scripts/update/recompilestoredprocedur

Error using on Win32

2002-06-25 Thread Pierre Rodrigues
How can I correct the following error: Software error: DBD::mysql initialisation failed: dbih_setup_attrib(DBI::dr=HASH(0x1ef3a6c)): FetchHashKeyName not set and no parent supplied at C:/WebSite/Perl5/lib/DBI.pm line 687. (in cleanup) dbih_getcom handle DBI::dr=HASH(0x1ef3a6c) is not a DB

Re: [Poop-group] ANNOUNCE: Class::DBI 0.89

2002-06-25 Thread Tony Bowden
On Tue, Jun 25, 2002 at 08:46:47AM +, william ross wrote: > i notice that defining a relationship with might_have doesn't add a > column to $class->__hasa_columns. is that something you're likely to > change? it's enormously useful for me to be able to define relationship > columns which mi

Re: strange error with using $db->do

2002-06-25 Thread Tim Bunce
On Mon, Jun 24, 2002 at 03:01:03PM -0700, Reddy Thalakola wrote: > I have cron script that runs fine on a bsd machine, but returns this output > on the linux machine. > > i have version 1.21 on the linux machine. > > DBD::Oracle::db do failed: ORA-0: normal, successful completion (DBD > SUCC

Re: DBI on a Zaurus

2002-06-25 Thread martin kraegeloh
Rick Osterberg wrote: >Has anyone been able to get the DBI architecture running on a Sharp Zaurus >Linux PDA? I don't own one, and haven't tried... but it could be a very >interesting and powerful platform if DBI were available for it. I'm in >the wings contemplating purchases... > lets see .

Re: MS Access

2002-06-25 Thread Thomas A. Lowery
DBD::ADO or DBD::ODBC Tom On Mon, Jun 24, 2002 at 04:22:38PM -0700, Erick Nelson wrote: > I've just spent the last 15 minutes looking at CPAN for a module to > query a MS Access database. > Which modules do I need to download? > Can someone throw me a hint? :) -- Thomas A. Lowery See DBI/FAQ