473,546 Members | 2,289 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Run Compact & Repair/Import Externally

I have three databases. DB1 has a button on a form. When I click that
button, I want to import all the objects from DB2 to DB3 (just as you
would if you would chose the File > Get External Data > Import menu
option). Then I want to Compact and Repair DB3. I want to do this all
by pushing the button in DB1.

Is this possible?

Nov 13 '05 #1
3 3263
Chuck Grimsby wrote:
Yes, it's possible. What part are you having a problem with?

Both! I tried by creating two database objects. I was successful in
looping through the TableDefs of the database I was copying from. But
I was not successful in appending them to the second database object.
I don't have my code with me right now. When I do I'll paste it.

I have no idea how to do the Compact and Repair externally. If you
have some sample code or a link to some, I would appreciate it!
Thanks in advance for any help!

Nov 13 '05 #2
Chuck Grimsby wrote:
Yes, it's possible. What part are you having a problem with?

Both! I tried by creating two database objects. I was successful in
looping through the TableDefs of the database I was copying from. But
I was not successful in appending them to the second database object.
I don't have my code with me right now. When I do I'll paste it.

I have no idea how to do the Compact and Repair externally. If you
have some sample code or a link to some, I would appreciate it!
Thanks in advance for any help!

Nov 13 '05 #3
Thanks again for the reply Chuck.

The example I gave (DB1, DB2, etc.) is just an example. I have a
number of apps (.MDBs) that are

used by my company. The data is stored in tables on SQL Server. My
..MDBs contain the forms,

reports, queries, macros and modules and they link to the SQL Server
tables.

Every time that a developer makes enhancements to an app they must go
through a procedure to make

sure the app is clean and is as small as possible. First, the
developer will open CleanDatabase.M DB. This database contains one
common module and one common macro. Then they import every object
(except for the common module and macro) into CleanDatabase.M DB from
the app they just changed.

Then the developer relinks all the tables, Compacts and Repairs the DB
and runs the common macro to lock it down. The CleanDatabase.M DB is
renamed to the name of the app that was enhanced and then it is pushed
out into production.

I would like to do all that programmaticall y rather than have it done
manually.

Nov 13 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
5559
by: Paolo | last post by:
Hi, I am trying to compact and repair my database, however every time I try it comes up a message saying: Table: "TempMSysAccessObject already exists", whenever I try to look for this table I cannot find it anywhere... Any clues... Already went into the help file and nothing... Also try to copy my database and the same message comes up
5
17644
by: Lauren Wilson | last post by:
Hi folks, Somewhere, I recently saw an article header titled: "How to compact and Repair a back-end Access db from the front-end using VBA" or words to that effect. Now that I need it, I cannot find it. Does anyone know were to find such an article?
6
3057
by: GaryDave | last post by:
My school registration database has not been quite right after a recent compact and repair (done while I was away). Though most of the many forms and subforms are working normally, one form in particular will no longer allow new entries into the subform - the recordset of the underlying query is no longer updatable. The subform in question...
2
1865
by: ApexData | last post by:
Hello I have finally completed an application and am preparing to install it on a network of 10 users. The application will be split FE/BE. The application has its own login, which controls the users ability to either ViewOnly or FullRights. Using Access2K. 20MB Database. My questions pertain to CompactOnClose:
1
2248
by: ncsthbell | last post by:
I have an Access 2000 database (running on Windows XP) that is used as a model and each user grabs a copy of this and puts onto their own drive. I have had 2 folks have issues with it lately. When they try to open it, the application does not fully open. What you see is a blank grey form with the dark blue title bar at the top with the...
4
2729
by: Bob Alston | last post by:
For those of you that have replicated databases, how often to you compact and repair them? Also what mathod do you use if you do this on an automated way? How do you make sure that the automated process is successful and if not, what process of notification is used? Bob
9
3305
by: Timmy! | last post by:
A2003 on Win XP Pro. A number of very stable apps I have are lately sometimes crashes when I do a compact & repair, especially when I hold the shift key to do so. When this starts happening, I usually turn off or restart my computer. Sometimes this stops the crashing, sometimes it doesn't. I'm really not sure why this is happening, I've...
4
2619
by: shalskedar | last post by:
The Compact & Repair option is not working on 1 of the computers .The Operating system used is Windows XP. In the Database,when the Compact & Repair option is used it creates a separate file as db1.mdb. Whereas other computers this option works fine..it no longer creates db1.mdbs separately. Does the computer which is not able to do...
0
7694
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
7947
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
0
7792
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
1
5360
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5080
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3491
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3470
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1046
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
747
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.