- yann dulondel
- PowerBuilder
- Wednesday, 21 June 2023 12:50 PM UTC
Hello
My powerbuilder version is 2022 b1900
Database MSSQL server 15.0.2000
I use French date format dd/mm/yyyy on my db
Using MSOLEDBSQL19 generate an error the date transmitted to the DB is yyyy-mm-dd mm:ss:ms.000
An error occurs as the DB can't convert the varchar into date the format should be normally dd-mm-yyyy mm:ss:ms.000.
No error is send back by PB , i viewed this in by testing SQLstatement capture in the MSSQL Profiler.
I use this as DBPARM
this.DefaultDBParm = "PROVIDER='"+DEFAULT_DBPROVIDER+"',PBTrimCharColumns='Yes',DelimitIdentifier='No',disablebind = 1,staticbind = 0,AutoTranslate='yes',DateFormat=''\''dd-mm-yyyy\'''',DateTimeFormat=''\''dd-mm-yyyy hh:mm:ss.fff\'''',TimeFormat=''\'hh:mm:ss.fff\'''',DATASOURCE='"+this.ServerName+"',PROVIDERSTRING='Database="+this.database+"',AppName='NLS v"+sVersion+"',Host='NLS'"
When i use SQLNCLI11 all works correctly.
SQLstatement without date in parameter works fine with MSOLEDBSQL19
I tried also to add this in the parameter
ProviderString='Language=French'
but changed nothing
Is it a bug or wrong configuration ?
Best Regards
Yann
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.