upgradesupport exception error

Hope some can tell me what i'm missing here.....
I converted a small vb6 app to VB2005 and cleaned up the errors it generated.
It runs fine on my development box, but when i install it on a win 2003 server
using an msi installer, i get "The type initilizer for 'myapp.upgradesupport' threw
an exception. This happens on the line of code:
MarsWorkspace = DAODBEngine_definst.Workspaces(0)

where MarsWorkspace is defined correctly.
any help out there for this?
tia

[509 byte] By [garyl] at [2007-12-16]
# 1
Hi Gary,

this sounds to me like it could be an installation problem. Does the target machine have the correct version of DAO?

John Hart
Microsoft

JohnHart_MS at 2007-9-9 > top of Msdn Tech,Visual Basic,Visual Basic General...
# 2
Hi John, yes it does. here's a little more detail (i was in a hurry when i posted this yesterday)
My development machine is xp pro sp2. I use an access 97 local database and sql 7 or 2000
for the backend. The program i'm testing with runs fine on my box, but when i install it on
my other test box (win 2003 server) is when i get the problem. I used the setup project thats
included in vs 2005 to make the setup for the other box. I have checked to make sure the
correct dll's ( interop.dao.dll) in that folder. There are also dao350.dll and dao360.dll in the
program files\common\microsoft shared\dao folder. Not sure if that could cause a problem.
I'm also running sql server on that box. Unfortunatly i'm stuck with the access 97 database
due to speed issues that i ran into using a more current flavor of access or msde or converting
the dao calls to ado. I have tried depends.exe and cordbg.exe but they don't seem to telling
what file/registry entry is missing or wrong.
hope thats enough detail and not too confusing
thanks
gary

garyl at 2007-9-9 > top of Msdn Tech,Visual Basic,Visual Basic General...
# 3
Hi Gary,

If you could send me a project that reproduces the problem I'd be glad to investigate it further for your.

You can send it to JohnHart@com.Microsoft (just reverse com and Microsoft)

In the mean time I'll see if I can create a repro here

John

JohnHart_MS at 2007-9-9 > top of Msdn Tech,Visual Basic,Visual Basic General...
# 4

Hi Gary,

Thanks for sending me the small repro project. I was able to reproduce the problem on Friday and I found if I used a Try Catch instead of an on Error Goto I was able to learn more about the problem. It turns out you're receiving an error when you're instantiating the DAO Engine (version 2.5). The reason is the runtime license is not being supplied. I haven't had a chance to investigate this much further but it does sound like a possible bug to me. Since it is with such an old version of DAO my guess is it may not be fixed any time soon.
The good news is the simple solution is to upgrade your project to using a newer version of DAO and everything works just fine.

I hope that helps,

John Hart

Microsoft

JohnHart_MS at 2007-9-9 > top of Msdn Tech,Visual Basic,Visual Basic General...
# 5

Sorry this relates to a thread from last year. Wondered if you could help me? I have inherited a software app using DAO and jet engine. It works fine on Win 95 (on which it was designed) but when opening a database from within the program on win2000 the application stalls. I notice you mention upgrading the version of jet. The install set (interbase) loads a version of this (3.0 I think). If I redo the install set and install a different version of jet engine do you think this will fix it? If so will I have to make any code changes. Since I never wrote this, it is a little difficult to find the problem. Any other ideas?

Chris Ewers

chrisewers at 2007-9-9 > top of Msdn Tech,Visual Basic,Visual Basic General...