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
[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.
FWIW: All my STD Framework Apps only use INI files. They are all working perfectly under PB 2022 R3.
Regards ... Chris
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.