Skip to Content.
Sympa Menu

freetds - Re: Error with dates

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: Leon Brooks <leon AT cclinic.com.au>
  • To: "TDS Development Group" <freetds AT franklin.oit.unc.edu>
  • Subject: Re: Error with dates
  • Date: Tue, 17 Sep 2002 20:52:46 +0800


On Tue, 17 Sep 2002 20:26, Stefan Sonnenberg-Carstens wrote:
> <?
>
> require_once("common.inc.php");
>
> $datetime = date("Y-m-d H:i:s");
>
> $conn = getConnection();
> $conn->debug = true;
>
> $sqlQuery = " INSERT INTO paymentTransactions "
> . " (LID, insertDate) "
> . " VALUES "
> . " ('1195', getdate()) ";

Maybe s/getdate()/'" . $datetime . "'/ ?

> if($conn->Execute($sqlQuery) === false) {
> echo "ERROR!\n";
> exit;
> }
>
> exit;
>
> ?>
>
> Sometimes, very strange,this error occurs :
>
> Warning: Sybase: Server message: The conversion of a char data type to a
> datetime data type resulted in an out-of-range datetime value. (severity
> 16, procedure N/A) in
> /usr/local/www/includes/adodb/drivers/adodb-mssql.inc.php on line 332 242:
> The statement has been terminated.
> ERROR!

--
Computer Clinic (WA) P/L Lasting good health for your network!
+61-8-9207-3686 http://www.cclinic.com.au/

linux.conf.au 2003 The Australian Linux Technical Conference
http://conf.linux.org.au/ 22-25 January 2003 in Perth, Western Australia





Archive powered by MHonArc 2.6.24.

Top of Page