开发者

Finding ODBC connection name

Situation:

  1. I have a program written in VB6
  2. The source code of the program is n开发者_StackOverflowot 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?


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.


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.


Can't you use a decompiler?


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).

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜