-
Sekhar Chitta
- PowerBuilder
- Wednesday, 12 March 2025 12:18 PM UTC
We are working on Sybase to MS SQL server migration project. The application is on PB 2017 R3 and connects through ODBC.
The datawindows are having Stored procedure as the datasource.
We are facing issues when the stored procedures are returning any date or time values as part of result set.
Below is the code in stored procedure. It's pretty simple and straight forward:
Declare @dt date
select @dt = convert(date, getdate(), 101)
select @dt
The field in datawindow is defined as 'date'
When I retrieve the datawindow in the design painter, I get 'Select error: Column lists do not match' error.
If I return entire datetime without any convert function, PB has no issues.
But if I use any kind of convert or cast function on date, PB not able to recognize the value.
When I built a new datawindow from the stored procedure, PB adds the field as 'compute_0001' on the datawindow.
Below is the DBParm connect string:
ConnectString='PBNewSPInvocation='YES',StripParmNames='Yes',CallEscape='N',StaticBind=0,DisableBind=1,TrimSpaces='Yes',OJSyntax='ANSI',StripParmNames='Yes'
I also changed the PBDateTime in PBODB170.ini file to MSSQL_DATETIME from DEFAULT_DATETIME
Please suggest what else need to be checked.
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.