Michael Peppler
Sybase Consulting
Sybase on Linux
Install Guide for Sybase on Linux
General Sybase Resources
General Perl Resources
BCP Tool
Bug Tracker
Mailing List Archive
Downloads Directory
Sybase on Linux FAQ
Sybperl FAQ
Michael Peppler's resume

sybperl-l Archive

Up    Prev    Next    

From: Andrei Nossov <anossov at yahoo dot com>
Subject: Re: Sybperl
Date: Apr 8 2000 4:59AM

Try the Sybase standard 'Apr 08 2000'. If this doesn't
help, use convert(...) in the insert statement.

- Andrei

--- wrote:
> Hello to all,
> I'm having problem trying to insert data into table.
> Every time I tried to
> run my script I get the following error:
> Server Message: (In srv_cb) Message Number: 249,
> Serverity 16, State 1, Line
> 1 Server 'HQ_MSGSRV' Message String: Syntax error
> during implicit conversion
> of VARCHAR value '$plan' to a SMALLDATETIME field. 
> Following is my sybperl code:
> my $sql = q!insert into pco..pco (  purpose,
> description, risk,
> location_soft, name_soft, implement_by,  princ_dev,
> plan_date)
> values( "$purpose", "$des", "$risk", "$loc",
> "$name", "$imp", "$princ",
> "$plan")!;
> 	 $dbh->ct_execute($sql); 
> 	while(($rc = $dbh->ct_results($restype)) == 
> 		$dbh->ct_cancel(CS_CANCEL_ALL);
> 	}  
> }      
> Column 'plan_date' is a smalldatetime type and null
> is allowed. And the
> format of the date I'm trying to enter for this
> column is 04/08/00.
> Most interesting part is the fact that I have a
> similar script which inserts
> date type and it works fine. 
> Please help. I have no clue what's wrong with my
> script.
> Tks
> Anton

Do You Yahoo!?
Talk to your friends online with Yahoo! Messenger.