Skip to content

Conversation

@ucko
Copy link
Contributor

@ucko ucko commented May 30, 2024

As of ASE 16.0, Sybase servers have started allowing dynamic query (prepared statement) declarations with IMAGE or (N)TEXT parameters. However, subsequent attempts to instantiate these queries have been failing with message 3805, "The token datastream length was not correct." In such cases, switch on dynamic query emulation (as already needed for older Sybase versions that immediately reject these declarations) and explicitly discard column information to avoid misconstruing the status of subsequent queries that yield no row results.

Split from #555.

As of ASE 16.0, Sybase servers have started allowing dynamic query
(prepared statement) declarations with IMAGE or (N)TEXT parameters.
However, subsequent attempts to instantiate these queries have been failing
with message 3805, "The token datastream length was not correct."  In such
cases, switch on dynamic query emulation (as already needed for older
Sybase versions that immediately reject these declarations) and explicitly
discard column information to avoid misconstruing the status of subsequent
queries that yield no row results.

Signed-off-by: Aaron M. Ucko <[email protected]>
@freddy77
Copy link
Contributor

I remember something like that, I tried to reproduce but I didn't manage. I tried with a txt like ? and a insert into ( txt ) values ( ? ) and they worked (ct_dynamic using CS_PREPARE and CS_EXECUTE).

Do you have a reproduction query?

@ucko
Copy link
Contributor Author

ucko commented Feb 14, 2025

Do you have a reproduction query?

Not at present, sorry; my usual tests succeed at this point without this change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants