SqlSetLongBindDatatype on SqlServer compatibility problem

Post found bugs and possible workarounds.
Nils Jänicke
Germany
Posts: 423
Joined: 20 Sep 2017, 11:56
Location: Villingen-Schwenningen, Germany

SqlSetLongBindDatatype on SqlServer compatibility problem

Post by Nils Jänicke » 25 Oct 2016, 07:03

Hi,

A test of 7.0 (32 Bit) on SqlServer shows folowing problem:
Fetching a binary datafield from an SQLServer database (other databases not testet) uses as index for SqlSetLongBindDatatype now first the bind variables within the WHERE clause and after that the INTO binds.
Example:
In Prior versions this code works fine:

Code: Select all

If SqlPrepare(hSql,'SELECT blob FROM mytable INTO :lVar WHERE keyfield = :nID')
  Call SqlSetLongBindDatatype( 1, DT_Binary )
  If SqlExecute( hSql ) And SqlFetchNext(hSql,nRetVal)
But in TD 7.0 an SQL error occurs because SqlSetLongBindDatatype( 1, DT_Binary ) switches the :nID bind variable and not the :lVar to a binary content.
I think this is a bug and should be changed.

Nils

Nils Jänicke
Germany
Posts: 423
Joined: 20 Sep 2017, 11:56
Location: Villingen-Schwenningen, Germany

Re: SqlSetLongBindDatatype on SqlServer compatibility problem

Post by Nils Jänicke » 27 Oct 2016, 09:25

Here is the test case. Connect to an existing SQLServer database and click to GO. On 6.3 or older it works fine, on 7.0 an error occurs.
You do not have the required permissions to view the files attached to this post.

Return to “Bug Reports”

Who is online

Users browsing this forum: No registered users and 0 guests