Jump to content

How to bind the SQL query datetime string literal with datetime instead of datetime2 with SNAC 11 driver in case of SQLBindParameter().


Recommended Posts

Guest Srinivas M_25
Posted

While using the SNAC 11 driver for ODBC connection with our application, the query that is filtering on a datetime field and comparing it to a datetime value on the right of the comparison generates the SQL query with a program variable bound to the datetime2 datatype instead of datetime, which is not the case with the SQL Server driver. The following are the SQL statements observed using the SQL Server profiler for SNAC11 and the SQL Server driver, respectively:declare @p1 intset @p1=NULLexec sp_prepexec @p1 output,N'@P1 int,@P2 datetime2',N'SELECT "prrowid", "custnum", "country", "name", "ad

 

More...

  • Replies 0
  • Created
  • Last Reply

Popular Days

Popular Days

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...