Just upgraded to asa 8.0.2 1299 from a pre 8.0.2 version. We
have a stored procedure that inserts a row into a table with
a timestamp. The value being inserted into the timestamp is
now(*). We get the error cannot insert timestamp into
timestamp.
Any ideas?
Thanks,
Brandon
thanks
brandon
Here is the section of the log that lists the error:
08/12 15:25:51.863 ** REQUEST conn: 805916408 STMT_PREPARE
"CALL uspImportActivity#Save( ?, ?, ?, ?, ?, ?, ?, ? )"
08/12 15:25:51.863 ** DONE conn: 805916408 STMT_PREPARE
Stmt=132562
08/12 15:25:51.863 ** REQUEST conn: 805916408
STMT_DESCRIBE_OUTPUT Stmt
=-1
08/12 15:25:51.863 ** DONE conn: 805916408
STMT_DESCRIBE_OUTPUT
08/12 15:25:51.863 ** REQUEST conn: 805916408
STMT_DESCRIBE_INPUT Stmt
=-1
08/12 15:25:51.863 ** DONE conn: 805916408
STMT_DESCRIBE_INPUT
08/12 15:25:51.864 ** REQUEST conn: 805916408 STMT_EXECUTE
Stmt=132562
08/12 15:25:51.864 ** HOSTVAR conn: 805916408 0 varchar
'0657'
08/12 15:25:51.864 ** HOSTVAR conn: 805916408 1 int '1479'
08/12 15:25:51.864 ** HOSTVAR conn: 805916408 2 timestamp
'2003-08-12
15:24:15.728922'
08/12 15:25:51.864 ** HOSTVAR conn: 805916408 3 tinyint '1'
08/12 15:25:51.864 ** HOSTVAR conn: 805916408 4 varchar
'Import of
Location'
08/12 15:25:51.864 ** HOSTVAR conn: 805916408 5 timestamp
'2003-08-12
15:25:51.742704'
08/12 15:25:51.864 ** HOSTVAR conn: 805916408 6 varchar
'SMART'
08/12 15:25:51.864 ** HOSTVAR conn: 805916408 7 int '0'
08/12 15:25:51.865 ** ERROR conn: 805916408 code: -157
"Cannot convert
timestamp to a timestamp"
This works OK...
CREATE TABLE x ( y integer default 'asdf' );
...but this...
INSERT x VALUES ( DEFAULT );
...raises 'Cannot convert asdf to a int' at runtime.
Breck
On 13 Aug 2003 10:11:55 -0700, "Anne Murray"
<nospam_...@sybase.com> wrote:
>Dear SirB;
>
>I have been conversing with someone else about this problem and I suspect
>that the issue is in the table creation ( why it wasn't picked up prior to
>8.0.2.4299 I'm not sure )
>
>The table was created with the following column :
>
> columnA timestamp not null default 'timestamp'
>
>So if I did and insert into the table using the default for this column, the
>default is actually the string 'timestamp' because of the quotes, thus the
>error is a bit confusing due to the actual contents of the string, and I
>think what its trying to say is cannot convert the string 'timestamp' into
>datatype timestamp.
>
>I believe if you remove the quotes, from not null 'timestamp', then you
>should be able to insert into this table successfully.
> Possibly, the fact that ASA lets you set string as a default value for a
>timestamp column could be a bug however I'm not 100% sure.
>
>Sincerely;
>Anne Murray
bca...@risingroad.com
Mobile and Distributed Enterprise Database Applications
http://www.risingroad.com
I have been conversing with someone else about this problem and I suspect
that the issue is in the table creation ( why it wasn't picked up prior to
8.0.2.4299 I'm not sure )
The table was created with the following column :
columnA timestamp not null default 'timestamp'
So if I did and insert into the table using the default for this column, the
default is actually the string 'timestamp' because of the quotes, thus the
error is a bit confusing due to the actual contents of the string, and I
think what its trying to say is cannot convert the string 'timestamp' into
datatype timestamp.
I believe if you remove the quotes, from not null 'timestamp', then you
should be able to insert into this table successfully.
Possibly, the fact that ASA lets you set string as a default value for a
timestamp column could be a bug however I'm not 100% sure.
Sincerely;
Anne Murray
--
Whitepapers, TechDocs, bug fixes are all available through the
iAnywhere Developer Community at http://www.ianywhere.com/developer
<sirB> wrote in message news:3f3957ca.5c...@sybase.com...