Package Wizard in Access22003 Developer Extensions

S

StuJol

I have created a database in access2003 and it is split into a front end and
back end. Both ends have been packaged with the access2003 developer
extensions package wizards and my database is now being used by my clients on
othr machines.

What im looking at doing up upgrading to a newer version of my database.

How do i go about updating the fe and be databases using the developer
extensions

i assume the front end can be overwriten. therefore if i just create a
package with only my new front end on it, use the same directorys as the
original version. When i install the new package, it will overwrite the old
frontend. Is this right???

the backend im not to sure about, i want to overwrite the backend because my
newer verion has some extra tables and some properties have changed in the
older tables but i dont want to lose any data that is already in the old be
when i upgrade. Any idea please??

Thanks to anyone who looks into this for me
 
D

Douglas J. Steele

You don't want to overwrite the backend, for the reasons you've already
noted.

What you can do is write code to modify your backend database to add the new
fields and make whatever other changes are necessary. You can either have
this as a stand-alone application, or you can include it in your existing
front-end. If you create a database property in your back-end database to
represent its version, you can have the front-end check for version, and run
your modification code if they don't agree.

The modification code can use DAO, ADOX or DDL statements to make the
modifications.
 
S

StuJol

Thanks for the reply Douglas, may i take this oppertunity to say thanks as
you have responded to several of my questions since i have started using
access.

can you give me an example of the kind of code i would use to add a new
field to an existing table, so i have something to work with. Also which part
of my front end would i add the code so that it would modify the back end?
would i have to create a new module?
 
D

Douglas J. Steele

Using DAO, it would be something like:

Dim dbBackend As DAO.Database
Dim tdfCurr As DAO.TableDef

Set dbBackend = OpenDatabase("full path to backend mdb file")
Set tdfCurr = dbBackend.TableDefs("NameOfTableToAddTo")
With tdfCurr
.Fields.Append .CreateField("NewTextField", dbText, 25)
.Fields.Append .CreateField("NewIntegerField", dbInteger)
.Fields.Append .CreateField("NewDateField", dbDate)
End With
 
S

StuJol

Many Thanks, all the best for the new year

Douglas J. Steele said:
Using DAO, it would be something like:

Dim dbBackend As DAO.Database
Dim tdfCurr As DAO.TableDef

Set dbBackend = OpenDatabase("full path to backend mdb file")
Set tdfCurr = dbBackend.TableDefs("NameOfTableToAddTo")
With tdfCurr
.Fields.Append .CreateField("NewTextField", dbText, 25)
.Fields.Append .CreateField("NewIntegerField", dbInteger)
.Fields.Append .CreateField("NewDateField", dbDate)
End With
 
D

Douglas J. Steele

The code itself would go into a module.

Without know how your application is set up, it's difficult to be more
precise. What I typically do is use the AutoExec macro to open a form as
hidden. In that form's Open event, I put calls to various modules to do
stuff I want done before the application starts, then I open the actual
first form. (The reason for using a hidden form is that I don't usually have
a switchboard, and I want to know that there's going to be a form open so
that I can use its Unload event to prevent improper shutdown)

If you don't want to use the versioning suggestion I made, you could always
just have a button they push to invoke the code.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

package wizard 5
Packaging and distribution... 4
package wizard 0
Access 2007 - Packaging Wizard 1
RUNTIME IN NETWORK 2
Linked databases 6
Access Runtime 6
Distributing runtime version of Access DB on a network 1

Top