Home All Groups Group Topic Archive Search About

The JET VBA File...Help Please!

Author
16 Jun 2009 9:23 PM
Webbiz
I'm getting this nasty error when trying to install and run a program
I wrote many years ago with VB5.

Recently I had recompiled the program in VB6 for redistribution.
However, this has caused an error to occur that says...

"The JET VBA file (VBAJET.DLL for 16-bit versions, or VBAJET32.DLL for
32-bit versions) failed to initialize when called. Try reinstalling
the application that returned the error."

When I did a search on this error, I got a Microsoft write-up that
said something about needing 'expsrv.dll' included in the program.

Okay. I use Inno Setup to create my installation file. So I added the
'expsrv.dll' and repackaged. But this didn't help.

I tried to reference 'expsrv.dll' via the VB6 IDE and recompile (ie.
Project | References), but couldn't get it to show up in the Reference
list to select it.

I'm baffled as to what Microsoft is asking me to do.

Anyone know?

Thank you in advance.

Webbiz

Author
16 Jun 2009 11:48 PM
Ralph
Show quote Hide quote
"Webbiz" <nospam@forme.thanks.com> wrote in message
news:iq2g355sehkkm7tgpt56igojeai2ek0nlq@4ax.com...
> I'm getting this nasty error when trying to install and run a program
> I wrote many years ago with VB5.
>
> Recently I had recompiled the program in VB6 for redistribution.
> However, this has caused an error to occur that says...
>
> "The JET VBA file (VBAJET.DLL for 16-bit versions, or VBAJET32.DLL for
> 32-bit versions) failed to initialize when called. Try reinstalling
> the application that returned the error."
>
> When I did a search on this error, I got a Microsoft write-up that
> said something about needing 'expsrv.dll' included in the program.
>
> Okay. I use Inno Setup to create my installation file. So I added the
> 'expsrv.dll' and repackaged. But this didn't help.
>
> I tried to reference 'expsrv.dll' via the VB6 IDE and recompile (ie.
> Project | References), but couldn't get it to show up in the Reference
> list to select it.
>
> I'm baffled as to what Microsoft is asking me to do.
>

You shouldn't need to include "expsrv.dll" or "vbajet32.dll". They have
shipped with Windows since 2000. Remove them from your package.

But frankly, if you are recompiling with VB6 why not go whole-hog and just
upgrade to DAO 3.60.

-ralph
Are all your drivers up to date? click for free checkup

Author
17 Jun 2009 1:07 AM
Webbiz
On Tue, 16 Jun 2009 18:48:16 -0500, "Ralph"
<nt_consultin***@yahoo.com> wrote:

Show quoteHide quote
>
>"Webbiz" <nospam@forme.thanks.com> wrote in message
>news:iq2g355sehkkm7tgpt56igojeai2ek0nlq@4ax.com...
>> I'm getting this nasty error when trying to install and run a program
>> I wrote many years ago with VB5.
>>
>> Recently I had recompiled the program in VB6 for redistribution.
>> However, this has caused an error to occur that says...
>>
>> "The JET VBA file (VBAJET.DLL for 16-bit versions, or VBAJET32.DLL for
>> 32-bit versions) failed to initialize when called. Try reinstalling
>> the application that returned the error."
>>
>> When I did a search on this error, I got a Microsoft write-up that
>> said something about needing 'expsrv.dll' included in the program.
>>
>> Okay. I use Inno Setup to create my installation file. So I added the
>> 'expsrv.dll' and repackaged. But this didn't help.
>>
>> I tried to reference 'expsrv.dll' via the VB6 IDE and recompile (ie.
>> Project | References), but couldn't get it to show up in the Reference
>> list to select it.
>>
>> I'm baffled as to what Microsoft is asking me to do.
>>
>
>You shouldn't need to include "expsrv.dll" or "vbajet32.dll". They have
>shipped with Windows since 2000. Remove them from your package.
>
>But frankly, if you are recompiling with VB6 why not go whole-hog and just
>upgrade to DAO 3.60.
>
>-ralph
>


That's the strange thing Ralph, there is no "expsrv.dll" or
"vbajet32.dll" in my setup script.

There IS dao360.dll.

Yet, I get this crazy error. And the only thing I can find online is a
reference to include expsrv.dll.

??

Webbiz
Author
17 Jun 2009 3:56 AM
Ralph
Show quote Hide quote
"Webbiz" <nospam@forme.thanks.com> wrote in message
news:34gg355naj3cignc2ib9tmglr9dapnnqc3@4ax.com...
> On Tue, 16 Jun 2009 18:48:16 -0500, "Ralph"
> <nt_consultin***@yahoo.com> wrote:
>
>
> That's the strange thing Ralph, there is no "expsrv.dll" or
> "vbajet32.dll" in my setup script.
>
> There IS dao360.dll.
>
> Yet, I get this crazy error. And the only thing I can find online is a
> reference to include expsrv.dll.
>

I find that odd as well. You must be using/referencing an earlier DAO either
explicitly or implicity through a control or other component. Or perhaps
Inno is being 'helpful', but it doesn't matter.

The suggestion to "include expsrv.dll" comes from the old days when
migrating from VS5 to VS6. Back then VS/SPs and Jet/DAO were on different
release cycles, and the dependency information was often not correct, and
development boxes and targets were often out of synch. Thus the general
policy was to include everything an application might need to run.and let
the installer sort out whether to install it or not.

However, that was a few years ago (10+ lol). Since then VS/(VB) and DAO/Jet
are essentially frozen. The best policy is to NOT include these support
files with your application install, but instead insure the target (and your
development platform) have the latest 'n greatest Jet package installed.

"How to obtain the latest service pack for the Microsoft Jet 4.0 Database
Engine"
http://support.microsoft.com/kb/239114

In most cases since the late versions of XP and with Vista and Win7 they
already are.

Take note: The specific version of a Jet component that your application
should use is NOT necessarily the one on the developement platform but
rather the one specified for your target's O/S.

-ralph
Author
17 Jun 2009 7:32 PM
Webbiz
On Tue, 16 Jun 2009 22:56:06 -0500, "Ralph"
<nt_consultin***@yahoo.com> wrote:

Show quoteHide quote
>
>"Webbiz" <nospam@forme.thanks.com> wrote in message
>news:34gg355naj3cignc2ib9tmglr9dapnnqc3@4ax.com...
>> On Tue, 16 Jun 2009 18:48:16 -0500, "Ralph"
>> <nt_consultin***@yahoo.com> wrote:
>>
>>
>> That's the strange thing Ralph, there is no "expsrv.dll" or
>> "vbajet32.dll" in my setup script.
>>
>> There IS dao360.dll.
>>
>> Yet, I get this crazy error. And the only thing I can find online is a
>> reference to include expsrv.dll.
>>
>
>I find that odd as well. You must be using/referencing an earlier DAO either
>explicitly or implicity through a control or other component. Or perhaps
>Inno is being 'helpful', but it doesn't matter.
>
>The suggestion to "include expsrv.dll" comes from the old days when
>migrating from VS5 to VS6. Back then VS/SPs and Jet/DAO were on different
>release cycles, and the dependency information was often not correct, and
>development boxes and targets were often out of synch. Thus the general
>policy was to include everything an application might need to run.and let
>the installer sort out whether to install it or not.
>
>However, that was a few years ago (10+ lol). Since then VS/(VB) and DAO/Jet
>are essentially frozen. The best policy is to NOT include these support
>files with your application install, but instead insure the target (and your
>development platform) have the latest 'n greatest Jet package installed.
>
>"How to obtain the latest service pack for the Microsoft Jet 4.0 Database
>Engine"
>http://support.microsoft.com/kb/239114
>
>In most cases since the late versions of XP and with Vista and Win7 they
>already are.
>
>Take note: The specific version of a Jet component that your application
>should use is NOT necessarily the one on the developement platform but
>rather the one specified for your target's O/S.
>
>-ralph
>


Yes Ralph, it's odd indeed.

A little history though...

The project in question (TTC251) was written back in 1997 (as best I
can recollect). I was not using VB6 then, but a previous version (VB5
I would think. Hard to remember, since I've been using VB since v3.0)

A few months ago, I dusted off the old app and loaded it into VB6 to
make sure it was working okay. I then re-compiled it and posted it
online as a free application for anyone who wanted to use it.

Now, although I notice from BrotherSoft that there have been over 300
downloads, only one person came forth and informed me of this error.

I ran it on my computer (under the IDE though) and it worked. So I
went to another XP machine, downloaded and installed, and got the same
error that he reported.

And that is how this all started.

Now I know I can just scrap this old DB stuff and perhaps port it over
to using SQLite and dhRichClient3 that I'm currently playing with in
my current project. Thing is, I'm so tied up with my current project
and I'd also like to learn what is causing this problem to begin with
(it's good to try and fix things rather than give up and revamp).

A search on the error brought me to all this advice to add that
expsvr.dll file and such.

:-)

Webbiz
Author
17 Jun 2009 1:33 AM
Webbiz
On Tue, 16 Jun 2009 18:48:16 -0500, "Ralph"
<nt_consultin***@yahoo.com> wrote:

>
>"Webbiz" <nospam@forme.thanks.com> wrote in message
>news:iq2g355sehkkm7tgpt56igojeai2ek0nlq@4ax.com...
>> I'm getting this nasty error when trying to install and run a program
>> I wrote many years ago with VB5.
>>
>> Recently I had recompiled the program in VB6 for redistribution.
>> However, this has caused an error to occur that says...
>>
>> "The JET VBA file (VBAJET.DLL for 16-bit versions, or VBAJET32.DLL for
>> 32-bit versions) failed to initialize when called. Try reinstalling
>> the application that returned the error."
>>

The program itself can be downloaded from
http://www.fdatesforum.com/TTC/ttc251.exe

Setup to read CSV files, there is a sample CSV file available at
http://www.fdatesforum.com/TTC/AN_REV.CSV

I ran the Package and Deployment Wizard to get the Dependancies.

That file is available at http://www.fdatesforum.com/TTC/Ttc25_1.DEP

And finally, the Inno Setup script that I created to match the DEP is
found at http://www.fdatesforum.com/TTC/TTC251.iss

I've included all these links JUST IN CASE someone was interested in
looking at these.

I'm baffled!

The program runs perfectly on my development system (XP Pro and VB6).

But when I try to install it on another XP machine, it gives me the
error just like the one another user of the program is reporting.

Anyone see where my flaw is?

Thanks.

Webbiz
Author
18 Jun 2009 3:44 PM
Webbiz
This is a CONCLUSION post for the benefit of anyone who comes across
this thread in a search for having a similar problem (and is probably
a novice like myself).

With the kind help of Randem offline, he directed me to an issue with
placing my application in the \Program Files subdirectory.

By having my application install in it's own subdirectory outside
\Program Files, the error shown below vanished and the program is
working fine.

I can't say this will the fix for others with this same error, but it
does provide one additional thing you can try.

Thanks to Randem and all who were kind enough to reply with
suggestions. Much appreciated.

Cheers!

Webbiz




On Tue, 16 Jun 2009 16:23:11 -0500, Webbiz <nospam@forme.thanks.com>
wrote:

Show quoteHide quote
>I'm getting this nasty error when trying to install and run a program
>I wrote many years ago with VB5.
>
>Recently I had recompiled the program in VB6 for redistribution.
>However, this has caused an error to occur that says...
>
>"The JET VBA file (VBAJET.DLL for 16-bit versions, or VBAJET32.DLL for
>32-bit versions) failed to initialize when called. Try reinstalling
>the application that returned the error."
>
>When I did a search on this error, I got a Microsoft write-up that
>said something about needing 'expsrv.dll' included in the program.
>
>Okay. I use Inno Setup to create my installation file. So I added the
>'expsrv.dll' and repackaged. But this didn't help.
>
>I tried to reference 'expsrv.dll' via the VB6 IDE and recompile (ie.
>Project | References), but couldn't get it to show up in the Reference
>list to select it.
>
>I'm baffled as to what Microsoft is asking me to do.
>
>Anyone know?
>
>Thank you in advance.
>
>Webbiz
Author
18 Jun 2009 5:55 PM
Ralph
Show quote Hide quote
"Webbiz" <nospam@forme.thanks.com> wrote in message
news:g0ok355ka9fk50m9g20b53crc3ebl4lvq1@4ax.com...
>
> This is a CONCLUSION post for the benefit of anyone who comes across
> this thread in a search for having a similar problem (and is probably
> a novice like myself).
>
> With the kind help of Randem offline, he directed me to an issue with
> placing my application in the \Program Files subdirectory.
>
> By having my application install in it's own subdirectory outside
> \Program Files, the error shown below vanished and the program is
> working fine.
>
> I can't say this will the fix for others with this same error, but it
> does provide one additional thing you can try.
>
> Thanks to Randem and all who were kind enough to reply with
> suggestions. Much appreciated.
>

Come on. There is more to the story... ?

-ralph

Bookmark and Share