- John J
- PowerBuilder
- Wednesday, 8 January 2020 04:31 AM UTC
Hi All,
I'm trialing PowerBuilder 2019 to upgrade an existing application currently on PB9. Did an auto upgrade using PB2019 and everything compiled well. Modified the code block to connect to MS SQL 2014 DB using OLE DB (I assume thats the best choice?). However while running the code, the code block is not able to get return values from Stored Procedures. Looks like it could be a small Database connection configuration issue?
Can someone please throw some light? Let me know if you need more info.
Below are the detals:-
Envronment : Windows 10 64 bit , Powerbuilder 2019 build 2082, MS SQL Server 2014
=====Error Details=====
sqlca.sqlcode = -1
sqlca.sqlerrtext = "The Procedure Has No Return Value. "
sqlca.SQLDBCode = 999
====Connection Parameters====
sqlca.dbms = OLE DB
sqlca.dbparm = PROVIDER='SQLNCLI11',DATASOURCE='<<myDBServer>>',PROVIDERSTRING='trusted_connection=yes'
(Using Windows authentication for DB)
====Copy of failing PB code block (same code runs fine in PB9, connected to same SQL 2014 DB) ======
DECLARE GetConnectionDatabase PROCEDURE FOR @li_retcode = dbo.GetConnectionDatabase
@ApplicationName = :as_appname
,@UserID = :as_userid
,@UsageMode = :ai_mode
,@ReturnPillar = :ls_returnpillar
USING SQLCA ;
EXECUTE GetConnectionDatabase;
If SQLCA.SQLCode = -1 Then
messagebox( iobject.DisplayName, 'Proc Failed: GetConnectionDatabase Error:' + sqlca.sqlerrtext )
CLOSE GetConnectionDatabase ;
Return -1
End If
============================
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.