Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ODBC call failed while running program on Windows NT 4.0 machine

Status
Not open for further replies.

33216CLC

Programmer
Aug 17, 2000
173
BS
Hi,

I installed a program on an NT machine, but get the above error when I attempt to open the program. Here is the situation:

1. When the user clicks on the program icon, a welcome screen appears prompting for a password. However, just before this prompt appears the odbc error message comes up. I click OK on the message box and get another message, Object variable or with block variable not set. I then enter the login info and Main Screen appears, but I am not able to access the database for the program.

2. I checked all the files that reference the path to the database. These include, the text file which is the first file the program checks, and the dsn files. In all cases, the path was set correctly.

3. That database is an Access 97 database.

4. The computer used to create the setup, cab and executable files runs Windows Millenium and VB 6.0.

5. I used the very same setup file to install this program on a Windows 2000 system. I got the odbc error also, but when I entered the correct path into the dsn's it worked perfectly.

Questions:
1. Any ideas what my problem could be? I thought missing .dll files could be involved, but I'm not sure. As I was installing I got several messages that certain dll files could not be copied because they were in use (eg. msvcrt.dll)

2. Will my program run sucessfully if I allow for all the files (including dlls) to be installed in my program's directory, instead of in Systems in Windows or System32 in Winnt?

Thanks
 
Hi Chip,

I already have a dsn file in the ...\..\..\ODBC\Data sources directory. Would I have to create another one? Here is the dsn that I have now:

[ODBC]
DRIVER=Microsoft Access Driver (*.mdb)
UID=admin
UserCommitSync=Yes
Threads=3
SafeTransactions=0
PageTimeout=5
MaxScanRows=8
MaxBufferSize=512
ImplicitCommitSync=Yes
FIL=MS Access
DriverId=25
DefaultDir=C:\Path
DBQ=C:\Path\file.mdb

NB. The system in question has the mdac 2.0 version. Would skipping to the lastest version cause any problems on an NT 4.0 machine?

Thanks
 
Is this the same version of MDAC that was on your development machine? They need to agree.

There probably won't be a problem going to the latest MDAC. There may be a few features which have been deprecated, but you seem to be doing fairly mainstream stuff, so you shouldn't have any problems.

Chip H.
 
Actually Chip,

There are 2 versions on my development machine. Version 2.0 is in C:\Visual Studio\VB98\Wizards\PDWizard\Redist, while Version 2.1 is in C:\Program Files\Visual Studio\VB98\Wizards\PDWizard\Redist. Version 2.0 is in the Cab file created by the VB Packaging and Deployment Wizard.

What I find strange is that an earlier version of my program was able to be installed on the very same NT machine and run without the odbc error (it uses the same version, 2.0 of MDac with the installation as the later version of my program).
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top