- Darren Longenecker
- PowerBuilder
- Monday, 13 April 2020 02:28 PM UTC
PB 19 Build 2082
SQL SERVER 2017
Upgrading our driver from SQLOLEDB to MSOLEDBSQL and now get issues w/ SQL's DBPARAMBINDINFO.
PROBLEM:
MSOLEDBSQL conflicts w/ the Now() function in that the driver only wants 3 milliseconds instead of Now's 6 milliseconds.
AFFECTS:
Anywhere that Now() is used to set a datetime variable that is then used to UPDATE or is sent to a stored procedure.
example:
ldt_date = DateTime(Today(),Now())
--then passing ldt_date to a stored proc expecting a datetime value.
Causes the error:
SQLSTATE = 22007
Microsoft OLE DB Driver for SQL Server
The fractional part of the provided time value overflows the scale of the
corresponding SQL Server parameter or column. Increase bScale in
DBPARAMBINDINFO or column scale to correct this error.
Tried using multiple combinations to the connectionstring including:
'SQLNCLI11'
DisableBind=1
and multiple versions of:
DateTimeFormat='\''yyyy-mm-dd hh:mm:ss.fff\
Anyone have this problem? What am I missing?
Thx, D
Find Questions by Tag
Helpful?
If a reply or comment is helpful for you, please don’t hesitate to click the Helpful button. This action is further confirmation of their invaluable contribution to the Appeon Community.