1. Connie Dove
  2. PowerBuilder
  3. Friday, 20 September 2024 14:56 PM UTC

I have an application that is running great using PB 2022 Runtime 1892.  I just upgraded it to use PB 2022R3 Runtime 3391.  And not when it tried to connect to another database, it throws an error.   Application runs fine in development on my PC.  But when I move it to the server where the runtime files have been deployed I get this error.

Unable to connect to the webuser_db
SQLDBCode = 999
SQLErrText  = DBMS NONE is not supported in your current installation.

 

I am using MS SQL Server 2017, with ODBC connections.

My connection string looks like this:

I have the settings in an INI file that the application pulls from

DBMS=ODBC
ServerName=Server1

WU_Database=webuser_db
WU_DBParm="ConnectString='DSN=webuserqa2017',OJSyntax='ANSI',CallEscape='No',DisableBind=1,AppName='FMMS REPORTS'"

 

In the code it does this

if NOT fileExists (gs_inifile) then
Messagebox ('', 'Incorrect ini file - ' + gs_inifile + '~r~nContact IS.')
halt
end if

to_webuser_db = CREATE transaction
to_webuser_db.DBMS = ProfileString (gs_inifile, gs_section, "DBMS", "NONE")
to_webuser_db.database = ProfileString (gs_inifile, gs_section, "WU_Database", "NONE")
to_webuser_db.servername = ProfileString (gs_inifile, gs_section, "ServerName", "NONE")
to_webuser_db.dbparm = ProfileString (gs_inifile, gs_section, "WU_DBParm", "NONE")

li_pos = pos (to_webuser_db.dbparm, 'DSN=')
// The login name & password are part of the DSN statement DSN='db;UID=name;PWD=pass',
to_webuser_db.dbparm = left(to_webuser_db.dbparm, li_pos - 1) + "UID=" + SQLCA.userid + ";PWD=" + SQLCA.LogPass + ";" + &
mid(to_webuser_db.dbparm, li_pos, len(to_webuser_db.dbparm))
to_webuser_db.Autocommit = TRUE
to_webuser_db.LogID = SQLCA.LogID
to_webuser_db.LogPass = SQLCA.LogPass

CONNECT using to_webuser_db;

return to_webuser_db.SQLCode

 

Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Friday, 20 September 2024 15:14 PM UTC
  2. PowerBuilder
  3. # 1

Hi Connie;

  This is typically a DB Client or a PB App DB configuration issue. Did you ...

  1. Deploy the new PB 3391 runtime via the PB Packager utility?
  2. Did you deploy the <AppName>.XML file from the compilation to the PB App EXE's deployment folder?
  3. Did you edit the <AppName>.XML file to make sure it points to where the PB runtime is actually installed on the deployment machine?
  4. Did you make sure that no old PB runtime files were in the deployed PB App EXE's folder or O/S path?
  5. Did you forget to deploy the PB DB ODBC driver?
  6. Did you make sure that the ODBC DSN on the deployment machine works?

Food for thought.   HTH

Regards .. Chris

 

Comment
  1. Connie Dove
  2. Monday, 30 September 2024 16:58 PM UTC
Here is the information from the gs_inifile



[COMMON]

Application=Reports

AutoCommmit=True



[Database]

Serverlist=QA,PROD,DEV

DEFAULTSERVER=QA (gets places into the gs_section variable)

DBParm="AppName='FMMS',PBCatalogOwner='dbo',staticbind=0,CallEscape='Yes',StripParmNames='Yes',disablebind=1"



[QA]

DBMS=ODBC

ServerName=servername

Database=database1

ConnectString=ODBCConnection

DisableBind=1

StaticBind=0

StripParmNames='Yes'

CallEscape='Yes'



DBParm="ConnectString='DSN=OFBCConnection',PBCatalogOwner='dbo',staticbind=0,CallEscape='Yes',StripParmNames='Yes',disablebind=1"

WU_Database=database2

WU_DBParm= "ConnectString='DSN=OdbcConnection2',OJSyntax='ANSI',CallEscape='No',DisableBind=1,AppName='REPORTS'"



Running through debug all connections and variables are set properly and the application runs as expected.



  1. Helpful
  1. Chris Pollach @Appeon
  2. Monday, 30 September 2024 18:02 PM UTC
Hi Connie;

FWIW: All my STD Framework Apps only use INI files. They are all working perfectly under PB 2022 R3.

Regards ... Chris
  1. Helpful
  1. Arnd Schmidt
  2. Monday, 30 September 2024 18:41 PM UTC
Try to catch:

IF to_webuser_db.DBMS = "NONE" THEN

IF IsNull(gs_inifile) THEN gs_inifile = "null!"

IF IsNull(gs_section) THEN gs_section = "null!"

MessageBox("Something went wrong", &

"gs_inifile: " + gs_inifile +"~r~n" +&

"gs_section: " + gs_section +"~r~n" +&

"CurrentDirectory: " + ::GetCurrentDirectory())

END IF



Sorry for the bad format. This Comment Editor sucks.
  1. Helpful 1
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.
We use cookies which are necessary for the proper functioning of our websites. We also use cookies to analyze our traffic, improve your experience and provide social media features. If you continue to use this site, you consent to our use of cookies.