RE: Prepare, SQL query with to_date call

2009-06-02 Thread Dhanashri Bhate
> -Original Message- > From: Martin Evans [mailto:martin.ev...@easysoft.com] > Sent: Tuesday, June 02, 2009 8:59 PM > To: dbi-users@perl.org > Subject: Re: Prepare, SQL query with to_date call > > Martin Evans wrote: > > Martin Evans wrote: > >> Dhanashri Bhate wrote: > -Original

FreeTDS, unixODBC, GENTOO and DBD::ODBC

2009-06-02 Thread col
[x-posted to unixODBC list] Is not possible in this combination since many version updates now. I'd like to get current AND with a working configuration. Working tunnel: ssh u...@the.pub.ip.add -q -f -N -L 1799:192.168.243.140:1433 (Yes, tsql works, no problems with the tunnel.) Very simple pe

Re: Prepare, SQL query with to_date call

2009-06-02 Thread Martin Evans
Martin Evans wrote: > Martin Evans wrote: >> Dhanashri Bhate wrote: -Original Message- From: Martin Evans [mailto:martin.ev...@easysoft.com] Sent: Tuesday, June 02, 2009 5:44 PM To: dbi-users@perl.org Subject: Re: Prepare, SQL query with to_date call >>> Dhanas

Re: Prepare, SQL query with to_date call

2009-06-02 Thread Martin Evans
Martin Evans wrote: > Dhanashri Bhate wrote: >>> -Original Message- >>> From: Martin Evans [mailto:martin.ev...@easysoft.com] >>> Sent: Tuesday, June 02, 2009 5:44 PM >>> To: dbi-users@perl.org >>> Subject: Re: Prepare, SQL query with to_date call >>> >> Dhanashri Bhate wrote: > Thanks,

Re: Prepare, SQL query with to_date call

2009-06-02 Thread Martin Evans
Dhanashri Bhate wrote: >> -Original Message- >> From: Martin Evans [mailto:martin.ev...@easysoft.com] >> Sent: Tuesday, June 02, 2009 5:44 PM >> To: dbi-users@perl.org >> Subject: Re: Prepare, SQL query with to_date call >> > Dhanashri Bhate wrote: Thanks, Well when I tried with p

RE: Prepare, SQL query with to_date call

2009-06-02 Thread Dhanashri Bhate
> -Original Message- > From: Martin Evans [mailto:martin.ev...@easysoft.com] > Sent: Tuesday, June 02, 2009 5:44 PM > To: dbi-users@perl.org > Subject: Re: Prepare, SQL query with to_date call > > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > Dhanashri Bhate wrote: > > Thanks, > > Wel

Re: Prepare, SQL query with to_date call

2009-06-02 Thread Martin Evans
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Dhanashri Bhate wrote: > Thanks, > Well when I tried with properly formatted string for a date field I still got > Error - Datetime field overflow. > > And the $dbh->do was just to show that it works, but $sth->prepare and > $sth->execute doesn't. >

RE: Prepare, SQL query with to_date call

2009-06-02 Thread Dhanashri Bhate
Thanks, Well when I tried with properly formatted string for a date field I still got Error - Datetime field overflow. And the $dbh->do was just to show that it works, but $sth->prepare and $sth->execute doesn't. One more thing is, I probably shouldn't use $dbh->do in a loop since I'm doing b

Re: Prepare, SQL query with to_date call

2009-06-02 Thread John Scoles
Dhanashri Bhate wrote: Forgot to mention, $dbh->do works, but $sth->execute doesn't. In the while loop, if I have the following - $insert_query = "INSERT INTO EMP VALUES ( $num, $name, $job, $mgr, TO_DATE ( $doj), $sal, $comm, $dept)"; That query above would not be a good idea as it wou

RE: Prepare, SQL query with to_date call

2009-06-02 Thread Dhanashri Bhate
Forgot to mention, $dbh->do works, but $sth->execute doesn't. In the while loop, if I have the following - $insert_query = "INSERT INTO EMP VALUES ( $num, $name, $job, $mgr, TO_DATE ( $doj), $sal, $comm, $dept)"; $dbh->do ( $insert_query ); This works well too. ___

Prepare, SQL query with to_date call

2009-06-02 Thread Dhanashri Bhate
Hi DBI users, I've recently started working on Perl DBI.I'm using ActivePerl on Windows XP, and using Oracle ODBC dsn. My database connection, and simple select queries work fine. The queries with $sth->prepare and with placeholders ( e.g. where SAL>?) work well too. I am having a problem when