UtterAccess.com
X   Site Message
(Message will auto close in 2 seconds)

Welcome to UtterAccess! Please ( Login   or   Register )

Custom Search
 
   Reply to this topicStart new topic
> Compact And Repair Access Database Using C# ?    
 
   
dongtrien
post Jul 29 2019, 09:28 PM
Post#1



Posts: 5
Joined: 28-July 19



Compress and fix access data in C#, I have to look for examples on google network but it's not running examples, how to compress and fix data in C# ?
Go to the top of the page
 
Phil_cattivocara...
post Jul 30 2019, 03:12 AM
Post#2



Posts: 364
Joined: 2-April 18



For C# read here (I assumed you are using accdb format)
How to Compact Access 2007 Database Programmatically
Always have a backup before doing anything (during test and production)
This post has been edited by Phil_cattivocarattere: Jul 30 2019, 03:13 AM

--------------------
Please forgive in advance my horrible English.
Go to the top of the page
 
dongtrien
post Jul 31 2019, 02:26 AM
Post#3



Posts: 5
Joined: 28-July 19



I have seen the link you sent, the above linnk only "CompactDatabase" without "Compact and Repair Access Database"
Go to the top of the page
 
Phil_cattivocara...
post Jul 31 2019, 03:35 AM
Post#4



Posts: 364
Joined: 2-April 18



When you compact you also repair, it's an "all-in-one" operation.

--------------------
Please forgive in advance my horrible English.
Go to the top of the page
 
isladogs
post Jul 31 2019, 05:20 AM
Post#5


UtterAccess VIP
Posts: 1,707
Joined: 4-June 18
From: Somerset, UK


Question. WHY do this in C#? Why not just do so in Access?

--------------------
Go to the top of the page
 
dongtrien
post Aug 27 2019, 11:33 PM
Post#6



Posts: 5
Joined: 28-July 19



Not where you have "Compact and Repair Access Database" separately, you see the code below, but I have not yet put the password into the code when running it will ask for a pass. How to put a password into the code ?
CODE
Microsoft.Office.Interop.Access.Application app = new Microsoft.Office.Interop.Access.Application();              
app.CompactRepair(PathFileSourceDB, PathFileDestinationDB, false);              
app.Visible = false;

Go to the top of the page
 
WildBird
post Aug 28 2019, 12:02 AM
Post#7


UtterAccess VIP
Posts: 3,620
Joined: 19-August 03
From: Auckland, Little Australia


Try checking this for options on passwords etc

--------------------
Beer, natures brain defragging tool.
Go to the top of the page
 
dongtrien
post Aug 28 2019, 09:41 PM
Post#8



Posts: 5
Joined: 28-July 19



compress and fix data type I do not use DAO, if you use DAO only compression does not fix data errors
Go to the top of the page
 


Custom Search


RSSSearch   Top   Lo-Fi    23rd October 2019 - 07:12 PM