Access 97 & VB5

I have a VB app that needs to be distributed to a machine without Access.  I know this is possible, but am getting run-time error 3265 - "item not found in this collection."  I don't really care about security on the database, I just want it to be accessable from my app.  Any suggestions?
neymeyerAsked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
wsh2Connect With a Mentor Commented:
Being a little more specific with Mark2150's very correct comment..
RUN MDAC_TYP.EXE on your client's machine!

In your setup.. make sure you include the MDAC_Typ.Exe file in the PDWizard redist directory.. (as per Mark2150, a FULL install setup).. or just copy it and run it on your client's machine. If you don't know where Mdac_Typ.exe is.. do a Start.. Find. If you still can't find it.. go to MSDN and download the latest MDAC versions and install them. My guess is that the client's Data Access Components are definitely out of synch with yours.. <smile>.
0
 
CrinCommented:
Hello neymeyer,

"item not found in this collection." usually means that programm try to access to unexisted field, for example...

Does this software works properly SOMEWHERE?

If not - this is the reason.
Then:
Run your application from VB shell and press "debug" when error occures.
Check spelling and fix it.


Sincerely yours,

Crin
0
 
mark2150Commented:
You need to install using the Setup Wizard and build the installation kit. Then when you install on a clean system it'll run like a top. If you're just copying the .EXE around this will NOT work. If you've done that and you're still getting the error then you have a programming error and not an installation issue.

M
0
Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
viveksarinCommented:
the matter of fact is that if you are using vB6.0 then in addin there is the option of deployment wizard go and create installable of your program and then try installing your program. also include your access database. i think it would work now.
0
 
neymeyerAuthor Commented:
The code works fine on the machine I coded it on, which has Access 97 on it, and I did create the setup program like mark2150 was talking about it.  There is no programming error to my knowledge unless the database, recordsets, etc need to be declared differently when Access is not installed??
0
 
CrinCommented:
Hello newmeyer,

Check if correct version of Microsoft DAO (you need 3.51 version) selected in Project->References.

Also try to locate exact line where trouble occures. To do it you can try to append call of shown DoDebug function after each line of the code.

public function DoDebug(Msg as String)
open "c:\myProg.txt" for append as #1
print #1, format(Now, "hh.mm.ss") & " - " & Msg
close #1
end function

Sincerely yours

Crin

0
 
neymeyerAuthor Commented:
I can't do the doDebug because it isn't my machine that is having the problem.  On my machine, where I developed the app, the program runs correctly.  I checked to be sure, and I am running the DAO 3.51 library.  I can't figure it out.  Thanks for your help, though.  Do you have any other suggestions?
0
 
mark2150Commented:
No, the declarations are all the same no matter what. I think you have something else going on than a bad install.

M
0
 
CrinCommented:
Hmmm...
Are you sure the database on the user machine is same with yours(means TableDefs, QueryDefs etc names)?

Seems the problem is here...

As a suggestion: what other references are active in your project? If there are some databases oriented one try to declare recordset variables directly as DAO.Recordset... (don't believe myself :)))

By the way: why not to create debug version and ask costumer to send back log file? It really can help... Forgot: of course DoDebug must send different Msg each line :)))

Sincerely yours,

Crin
0
 
neymeyerAuthor Commented:
Mark2150,
Any ideas what could cause it to run fine on my machine, but not the other?  I checked on Microsoft's site, but they only listed a solution for Access 95.  The fix is not the same in Access 97.
0
 
mark2150Commented:
Are you running the compiled version or are you running in the debug environment? If you have the error trapping turned off in the IDE then the error will go unnoticed but will occur in the production app.

M
0
 
neymeyerAuthor Commented:
Crin,
One thing I looked at was that for some reason I had the data bound grid selected, but not used.  Would that make a difference?  I have removed the component and reference.  I can try resending the executable to the client and find out how it works, unless you don't think it will change anything.
0
 
mark2150Commented:
Before you send the .EXE out, rebuild the project's install kit and compare the SETUP.LST files from the original and the new and see what (if anything) changed.

M
0
 
CrinCommented:
Hmm...

It could be installation problem ONLY if you forgot to include some files to media and there are incompatible version of these files on the user's machine.

BUT in this case other types of errors occures usually. Here is the problem with array of controls or with database access. Controls array must produce error anywhere (for example me.optbuttonCase(5).value when there are only 4 optbuttonCase loaded).

As soon as your installation was prepared by wizard - it collect all references and build installation right way (of course EVERY code have own bugs - wizards also :)). But it seems to me that it is local and users databases incompatibility...

Sincerely yours,

Crin

PS. English is not my native language so don't hesistate to ask for more detailed explanations :)
0
 
CrinCommented:
Wow... you really need to send installation, not exe itself, at least now, in the future (when problem disappear) you can send exe only while there are no new references added.

Sincerely,

Crin


0
 
neymeyerAuthor Commented:
Good point...should send the installer

mark2150 - I must have deleted the old installer after I sent it out.  It won't be any problem to send a new one until the problem is resolved.
0
 
mark2150Commented:
Yeah, I'd start out by sending a *FULL INSTALL* and rerunning from scratch. There is usually a STxUNST.LOG file created at install time in the same directory as the .EXE is in. Have the client send this to you to see what (if anything) was updated. It'll show you what .DLL's and such were loaded.

M
0
 
neymeyerAuthor Commented:
would the MSFlexGrid cause any problems?  I do use some of those, but not directly with the database???
0
 
CrinCommented:
Don't think so...
MSFlexGrid seems to work Ok

By the way, isn't it time to adjust more points? :)))))))

Sincerely yours,

Crin
0
 
neymeyerAuthor Commented:
I was going to give both of you like 100, but just haven't done it yet.  I assure you that you will get those for all the work you and mark2150 are doing to help me out.  Does that sound fair?
0
 
CrinCommented:
---- OFFTOPIC ----

I'm the very first time here, sorry if it is not in EE rules...  But sounds really fair... :)))

---- OFFTOPIC ----

0
 
mark2150Commented:
neymeyer,

Don't worry about the points. I've already got 1/4 million of 'em, three T shirts and a Palm Visor. Just glad to help.

M
0
 
wsh2Commented:
mark2150..
<looking at my hand and then lap>.. You gotta Palm Visor?.. Gosh, I better get to work then!!!.. <lol> and a <wink>.
0
 
barnackyCommented:
Be very careful to choose the right version of mdac_typ.exe.  If all you have is VB5, then you should be okay.  When you run mdac_typ, make sure it displays the proper version.  You do not want to run mdac 2.1.
0
 
wsh2Commented:
Adding to barnacky's comment:
If you are installing to a Windows 95 machine.. make sure it has DCOM installed or the MDAC components will not work.. <smile>.
0
 
wsh2Commented:
Barnaby:
Question - what is with MDAC 2.1? I seem to recall reading somewhere it is buggy, can you elaborate? Also.. latest version of MDAC on MSDN is 2.5.. what are the differences?.. Thank YOU.. <smile>.
0
 
barnackyCommented:
I'll try to elaborate.  MDAC has gone through a series of upgrades that include fixes, additions, and new providers for new databases.  I believe ADO 1.0 was Microsoft's first try and 1.5 followed.  However, ADO 2.0 was really the first version that people started using instead of DAO or RDO.

In terms of Access, ADO 2.0 included the OLE_DB Provider for Access 97.  As the Office 97 Service Packs were released, ADO 2.0 was updated concurrently.  When VB6 was released, (and Office 2000) ADO 2.1 was released.  ADO 2.1 contained the OLE_DB Provider for Access 2000.  This provider worked with Access 97 databases, but there were a few "glitches" since Access 2000's Jet engine was different than Access 97's Jet engine.

ADO 2.5 is the latest release.  It includes additions to ADO 2.1 to allow it to work better with web site development (XML), and it contains a provider for the Active Directory.  I'm sure there is more, but this is from the top of my head.

Finally, if you are using Access 97, I highly recommend you use ADO 2.0 based on my experience.  I never noticed a performance drop with ADO 2.1 and Access 97, but the Jet4.0 Provider doesn't support features such as replication with Access 97.

In addition, it doesn't hurt to install all the versions of ADO, JUST MAKE SURE YOU DO IT IN ORDER.  ADO 2.0, ADO 2.1, ADO 2.5.  If you need ADO 2.0 or 2.1, I have both, and I would be glad to email them to you.
0
 
wsh2Commented:
Thank YOU for the MDAC comment Barnacky!!!.. I hope it helps the questioner.. <smile>.

Adding to Barnacky's comment again.. <groan>.. on the client machine, make sure they have DCOM installed.. or the MDAC installation will fail.. <sigh>. DCOM98.EXE is the latest version that I know of.. check your VB6 / Studio CD-Rom for a copy of it.. <smile>.
0
 
neymeyerAuthor Commented:
Do I need the DCOM if it is running on NT 4.0?
0
 
wsh2Commented:
No.. DCOM shipped with NT 4.0.. the main concern you might have is legacy Windows 95 machines.. that have very little software installed.
0
 
neymeyerAuthor Commented:
Adjusted points from 30 to 50
0
 
neymeyerAuthor Commented:
Thanks!!  I used the mdac and it works now.  I gave you some more points also.

Neymeyer
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.