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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Data not saving from MDE File!

Status
Not open for further replies.

cRODEEkrank

Technical User
Dec 5, 2001
41
0
0
US
I have a database in which I've created an MDE file and saved this to a different directory than the database. However, the data which is entered into the MDE file isn't being saved to the MDB. If I have to make a change to the database, I re-create the MDE file but since the data isnt' being saved out to the database tables it disappears.

Why is this, and how come this warning is no where to be found in any kind of MDE reference?

Help!
Crod
 
It sounds to me as if your MDB file contains both your code and your tables. When you create the MDE file, it will contain copies of everything--both the compiled code and the tables (though not the source code). When the code in the MDE executes, it processes the tables in the MDE. This is what it is supposed to do.

What you expected it to do, I assume, is process the tables in the MDB file. It won't, because code and macros are only aware of tables in their own database. (Actually, code can process tables in another database, but that's not the normal way of doing things.)

If I'm right, what you need to do first is run the Database Splitter on the MDB file. That will move all the tables to a new database, and replace them in the MDB file with "linked tables" (surrogates for the tables in the other database). After that, the code in the MDB file will make requests against the "linked tables", and the Jet engine will execute the requests against the tables in the other database.

Once that's working, you can create your MDE file. The MDE and the new database that contains the tables constitute the application; the original MDB database you keep for yourself, so you can make changes as needed.

Is that what you needed? Rick Sprague
 
Thanks Rick for this information. I've done a lot of reading on creating MDE files and in all the resources I've used, there was never any mention of splitting the MDB first. As a result, whenever I made a change to the MDB and re-created the MDE, all the table data stored in the MDE was lost!
 
You probably didn't see it in your reading because it isn't an essential part of preparing your application for distribution. If it were a one-off application that you weren't going to be supporting, it's easier for the user if you don't split it.

For a normal commercial environment, especially a multi-user environment, all databases should be split--whether or not you mean to create an MDE out of the front end. Rick Sprague
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top