View Full Version : Database Problems

01-26-2004, 04:00 PM
I am using these database objects in my visual basic 6 project:

msado25.tlb - Microsoft ActiveX Data Objects 2.5 Library
msderun.dll - Mircosoft Data Environment Instance 1.0 (SP 4)
DAO 25351 - Microsoft DAO 2.5/3.51 Compatablity Library

I am also using these controls:


I know the problem is when the program first starts and goes to this code:

Function OpenDatabase() As Integer

'Trap all database open erros
On Error GoTo databaseopenerror

'Set the location of the system database
Set wks = CreateWorkspace("MyWKS", "Admin", "", dbUseJet)
Workspaces.Append wks
Set db = wks.OpenDatabase(zAppPath + zDatabasename, False, False, ";pwd=" & databasepass)

'Return OK
DB_OPEN = True
OpenDatabase = True
Exit Function

OpenDatabase = False
Call logerror("Function OpenDatabase()", Err.Description, Err.Number)

End Function

All of the variables in the code are set to the appropiate values. The code does work on the machine I created it on and Windows XP machines. However, the code is unable to open the database when run on a Windows 2000 computer.

I have made the install with InstallShield Express 5 and used the Visual Basic wizard to scan for the needed files. Any ideas why I am having this problem? Is ADO 2.5 not supported? Is there a quick way to update my code without having to change several lines? Thanks for the help in advance.

04-14-2004, 11:56 AM
Having a similar problem. Here is something to try. On your install client goto to the system32 folder and you will find msderun.dll (vb data environment runtime). This file is installed with your data environment merge module. What I found is it is not being registered. If you manually register, you may get your vb exe to run.

I am still trying to figure out why this is not getting automatically registered. Any help would be appreciated!