We have two very similar programs, that are both running on Windows Server 2016. They are PowerBuilder 12.6 programs. Let’s call them A and B.
A runs very well, just like it did on the old Windows Server 2008 R2 system we copied it from. B can’t find its data source.
Plainly, the data source has been defined, since A can find it. B says:
Connect failed.
SQLCode: -1
SQBDBCode: 999
SQLErrText: SQLSTATE = IM002
[Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified
User: (our user name)
SQLReturnData: (blank space)
My colleague tells me that this is a dialog provided by PowerBuilder. (I am not a PowerBuilder programmer. I am a C++ and Javascript programmer.)
My other colleague who set up the machine, tells me that the machine should be presenting the same thing to both programs. But plainly there is some difference.
Which brings me to my question: Is there some simple PowerBuilder application to which I can pass the datasource name, and it will try to connect to the datasource with verbose debugging on full? If there is an object B doesn’t have access to, I would like B to tell what the object is, for example.
Is there such a program? Or has someone encountered this before, and knows what is going on?
Regards, Rick
1. A and B run on the same machine. I moved them so they ran on the same disk. No change.
2. The connection string is defined as a system dsn. Both A and B use the same connection string.
3. The connection string is defined 32-bit. There is no definition on the 64-bit side. It is a 64-bit machine, but I am told we need to use 32-bit.
I had the thought that since it says "I don't see that connection string, and you didn't give me a default" I could give it a default? Similarly to how I put /pbdebug on our executable file. Something like /default="some-connection-string".
What do you think?
The last time I saw something like this ... App "B" had some non-printable / display characters (or inappropriate spaces) in its DBParm field where the DSN="?????" setting was being read from by the ODBC driver.
HTH
Regards ... Chris
You could use SQLCA.DBMS = "TRACE ODBC ...." instead of "ODBC ..." but I doubt that would give you any information, since you fail on the connection itself.
Can you connect from the powerbuilder IDE when you use a DB profile for program B?
Can you connect from the winodws ODBC administrator to the DB profile for program B?
Can you show us the code you use to connect? Like: sqlca.dbms = ... sqlca.dbparm= .. etc. and then connect: