Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Visual Basic > VB 6 Visual Basic 6 > VB Databases Basics
|
VB Databases Basics Beginning-level VB coding questions specific to using VB with databases. Issues not specific to database use will be redirected to other forums.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the VB Databases Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old January 7th, 2005, 03:09 AM
Authorized User
 
Join Date: Jan 2005
Posts: 17
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to yeetesh
Default copy an access database and then rename it .

How can i copy an access database and then rename it in vb 6.0.
Any one with sol. It's urgent.


 
Old January 7th, 2005, 04:36 AM
Registered User
 
Join Date: Dec 2004
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi,

Try this

DBengine.CompactDatabase [sourcedatabasename],[newdatabasename]
ie:
Dbengine.Compactdatabase "c:\myolddatabase.mdb","d:\mynewdatabase.mdb"

You need to make a reference to DAO 3.51 or 3.6, but you probably have it already.

Best regards,:)
Finn

 
Old January 7th, 2005, 05:34 AM
Authorized User
 
Join Date: Jan 2005
Posts: 17
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to yeetesh
Default

thanx Finn for ur prompt responseit worked perfectly


 
Old December 26th, 2007, 07:29 PM
Registered User
 
Join Date: Dec 2007
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I am new to all of this and would like to know how and where this code can be applied.

Thanks....

Rt
 
Old December 27th, 2007, 09:26 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 2,189
Thanks: 5
Thanked 59 Times in 57 Posts
Send a message via MSN to gbianchi
Default

what do you mean with that question. I realized you are new, but what are you looking for???

HTH

Gonzalo

================================================== =========
Read this if you want to know how to get a correct reply for your question:
http://www.catb.org/~esr/faqs/smart-questions.html
^^Took that from dparsons signature and he Took that from planoie's profile
================================================== =========
My programs achieved a new certification (can you say the same?):
WORKS ON MY MACHINE
http://www.codinghorror.com/blog/archives/000818.html
================================================== =========
I know that CVS was evil, and now i got the proof:
http://worsethanfailure.com/Articles...-Hate-You.aspx
================================================== =========





Similar Threads
Thread Thread Starter Forum Replies Last Post
Copy worksheet to another workbook and rename it Probleminfinity Excel VBA 1 August 19th, 2007 11:38 PM
copy and rename red_fiesta Classic ASP Professional 1 November 8th, 2006 11:00 AM
NEWBIE: Copy and Rename arthurb XSLT 3 April 12th, 2006 01:00 PM
copy an access database and then rename it . yeetesh Beginning VB 6 1 January 7th, 2005 04:40 PM
Making Copy of Current Access Database peterf VB Databases Basics 5 November 23rd, 2004 07:16 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.