Sql Server: empty timestamp field if text in select

General discussion forum about all databases other than SqlBase.
anuta

Sql Server: empty timestamp field if text in select

Post by anuta » 12 Apr 2012, 16:03

Hello,

in Sql Server, we use a field from type "timestamp" in each table to implement rowversion-semantic. (In Oracle, we use Number+Sequence for the same proposal).

On TD-side, the corresponding fields or columns (classes ccRowid and cdfRowid) are realised as Strings.

The problem occurs [only in Sql Server], if SELECT-Statament contains a bind variable from target type "timestamp" and a bind variable from the target type "text" at the same time.

The "text" field or column is declared as Long String with the length 32000. SqlSetLongBindDatatype is called between Prepare and Fetch for the corresponding column with 22 (BIND_Text ).
TD Version is 6.0 SP5.

Jeff Luther

Re: Sql Server: empty timestamp field if text in select

Post by Jeff Luther » 18 Apr 2012, 01:03

Need to see some code fragment with all the explanation displayed, like SELECT statement, SqlSetLongBindDatatype call(s), etc. Better still, a small test case with SQL for temp table would be best.
SqlSetLongBindDatatype is called between Prepare and Fetch
You probably mean this, but that Sql function is called in this position:
prepare & execute -- this could be one function SqlPrepareAndExecute() or called separately.
SqlSetLongBindDatatype
fetches

Return to “General Discussion”

Who is online

Users browsing this forum: [Ccbot] and 0 guests