- Jon Stoller
- PowerBuilder
- Wednesday, 1 November 2017 06:24 PM UTC
I am upgrading my application from PowerBuilder v7 to PowerBuilder 2017. The PBLs are in the new version and the application compiles/deploys successfully. I should mention that I get a message at the end of the compiling that says "Invalid Executable File Name", but it creates a new executable and new PBDs. Besides that message it seems OK.
My problem now is the runtime doesn't connect to the database. When I run the application it does not connect to the database.
The database is a Microsoft SQL Server database. I have version 2016 here. My clients all use version 2008R2.
The application code is as follows:
pt_sqlca.dbparm = "PROVIDER='SQLNCLI11SQL',DATASOURCE='" + pt_sqlca.Servername + "',PROVIDERSTRING='DATABASE="+pt_sqlca.Database+"'"
connect using pt_sqlca;
The actual content of pt_sqlca.dbparm is:
PROVIDER='SQLNCLI11SQL',DATASOURCE='aka1001',PROVIDERSTRING='DATABASE=popss'
I tried changing the Provider to SQLNCLI and SQLNCLI11. It did not work with either one.
In PBv7 it says PROVIDER='SQLOLEDB'. I tried SQLOLEDB in PowerBuilder 2017 also, but that also didn't connect.
The other parameters are:
pt_sqlca.LogID = "aka"
pt_sqlca.LogPass = "aka"
pt_sqlca.UserID = "aka"
pt_sqlca.DBPass = "aka"
pt_sqlca.Database = "popss"
pt_sqlca.Servername = "aka1001"
pt_sqlca.Dbms = "SQLNCLI11SQL"
pt_sqlca.lock = "RU"
After the attempted connect, the return code, pt_sqlca.sqlcode = -1
What am I doing wrong? What do I have to do to connect?
--------------------------------------------------------------------------------------------
The application connects to the database from inside PowerBuilder. The DB Profile Preview is:
SQLCA.DBMS = "SNC SQL Native Client(OLE DB)"
SQLCA.LogPass =
SQLCA.ServerName = "aka1001"
SQLCA.LogId = "aka"
SQLCA.AutoCommit = False
SQLCA.DBParm = "Database='popss',Provider='SQLNCLI11SQL'"
If you need other information from me, let me know and I will send it.
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.