1. Rick Hedin
  2. PowerBuilder
  3. Thursday, 19 December 2019 21:11 PM UTC

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

Miguel Leeuwe Accepted Answer Pending Moderation
  1. Thursday, 19 December 2019 21:25 PM UTC
  2. PowerBuilder
  3. # 1

Hi,

Does program B run okay on the same server as program A?

I'd guess you might not have the correct ODBC client installed on the server of program B (32 bit vs 64 bit?)

You have not given any information about the connection string, so I'm only guessing here.

If your pb executable is 32 bit:

Does the DSN name exist when you run "ODBC Administrator (32 bits)"?

If so, can you click the "configure" button work or is it disabled? If it's disabled then the dsn you're looking at, has been configured using 64 bit odbc administrator and you should re-define it using the 32 bit administrator.

Vice versa for pb executable 64 bit.

Also, it should be possible to connect even without having configured an odbc connection, but then your connection string needs more information.

Useful link:

https://community.microfocus.com/t5/Silk-Test-Knowledge-Base/How-do-I-resolve-error-quot-IM002-Microsoft-ODBC-Driver-Manager/ta-p/1736235

HIH

 

Comment
  1. Rick Hedin
  2. Friday, 20 December 2019 20:30 PM UTC
Hi, Miguel.

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?
  1. Helpful
  1. Chris Pollach @Appeon
  2. Friday, 20 December 2019 21:00 PM UTC
Hi Rick;

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

  1. Helpful
  1. Miguel Leeuwe
  2. Saturday, 21 December 2019 00:33 AM UTC
Hi Rick,

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:
  1. Helpful
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.