Easysoft ODBC-ODBC Bridge

My parameterised inserts hang and my ODBC-ODBC Bridge Server is using over 90% of cpu. What can I do?

Article:
00711
Last Reviewed:
17th January 2024
Revision:
3

This was first reported to us from a customer using Perl, but it is not Perl-related. It seems to be SQL Server 7 specific. If you call SQLDescribeParam after preparing a parameterised insert with invalid SQL, Microsoft's SQL Server ODBC driver does not appear to return from the SQLDescribeParam call. E.g.:

insert into table values (column1, column2) (?,?)

is incorrect as the "values" should come after the column names.

The sequence of ODBC calls is:

SQLPrepare("insert into table values (column1, column2) (?,?)")
SQLNumParams() returns 2 correctly
SQLDescribeParam(1) hangs never returning

It appears that the SQL Server ODBC driver rearranges the SQL. The driver issues a SELECT statement on the table for the specified columns so it can find out column information to be returned as parameter information. If SQL is invalid, this process fails and the insert hangs.

Applies To

Knowledge Base Feedback

* Did this content help you?
* Please select one option based on your first choice:

(* Required Fields)