user239014
user239014

Reputation:

Finding ODBC connection name

Situation:

  1. I have a program written in VB6
  2. The source code of the program is not available
  3. It connects to a database using ODBC connection string.
  4. The vendor setup a connection name to the database when the program was first installed 6 years ago
  5. My machine crashed, all the settings are gone!
  6. The program vendor is out of business. Even they don't have the source of the program now.

Question:

Can I find the ODBC connection name in anyway?

Upvotes: 4

Views: 3485

Answers (4)

jac
jac

Reputation: 9726

You can use Process Explorer to catch the connection string your program is trying to open. You can find almost everything a program is doing, and you can filter what information is captured/displayed.

Upvotes: 4

MarkJ
MarkJ

Reputation: 30398

I'm not sure I've understood. What exactly happens when you try to run the program? Is the problem that the ODBC connection string was lost because the settings were lost when your machine crashed?

If so I would try the following.

  • Look on a backup for the configuration file of the VB6 program. It may be an INI file.
  • Do you know what the database is? Is it an Access file (*.MDB), SQL Server, or what? You may be able to recreate the connection string from scratch. You might have problems if you need to supply a password.
  • Are you still in contact with anyone from the vendor? I'd have thought whoever originally wrote the program would be best able to help, and might be willing to do a couple of days consultancy.

Upvotes: 1

Mark Wilkins
Mark Wilkins

Reputation: 41232

You can probably run an ODBC trace and then look in the log file to see what the attempted name was. Run odbcad32.exe and go to the trace tab and turn it on. Run your app and then look in the log file (probably at the SQLConnect call).

Upvotes: 0

Shoban
Shoban

Reputation: 23016

Can't you use a decompiler?

Upvotes: 0

Related Questions