PEPPLER.ORG
Michael Peppler
Sybase Consulting
Menu
Home
Sybase on Linux
Install Guide for Sybase on Linux
General Sybase Resources
General Perl Resources
Freeware
Sybperl
Sybase::Simple
DBD::Sybase
BCP Tool
Bug Tracker
Mailing List Archive
Downloads Directory
FAQs
Sybase on Linux FAQ
Sybperl FAQ
Personal
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


--- AGaneshalingam@globewireless.com 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)) == 
> CS_SUCCEED)	{
> 		$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.
http://im.yahoo.com