tags:

views:

16

answers:

0

I work on a third party language product which does dynamic binding via ODBC and a customer is wanting to be able to insert bound variables without a field list, i.e. INSERT INTO table VALUES (values), not INSERT INTO table (columns) VALUES (values). The problem is that in the former case for SQLServer bind variables, the AUTO_INCREMENT (IDENTITY) columns are not ignored, so each parameter ends up off by one. It doesn't look like our app is setting IDENTITY_INSERT anywhere. I ran across SQLGetTypeInfo which appears to give the right answer for result sets, but this is an INSERT, hence, no result sets. Does anyone know of an equivalent API that will work against bind parameters for an INSERT, UPDATE etc?

I know, I know, have the customer fix the query. I'll try that too but I'm not sure it will fly.

Thanks for any info you might have.