compacting access databases in vb .net

  • Thread starter Thread starter ray well
  • Start date Start date
R

ray well

hi,

i have an access database file attached to an app via ado, that needs to be
compacted and repaired from time to time. in regular vb i would do it thru

DBEngine.CompactDatabase sDataBaseBackupFile, sDatabaseFile
how do this in vb .net ado ?

i would appreciate a snippet of code, and if i have to add a referencer in
my solution to some specific file.



thanks for any help

ray

please respond to the list
 
* "ray well said:
i have an access database file attached to an app via ado, that needs to be
compacted and repaired from time to time. in regular vb i would do it thru

DBEngine.CompactDatabase sDataBaseBackupFile, sDatabaseFile
how do this in vb .net ado ?

i would appreciate a snippet of code, and if i have to add a referencer in
my solution to some specific file.

ADO.NET group:

<
Web interface:

<http://msdn.microsoft.com/newsgroup...roup=microsoft.public.dotnet.framework.adonet>
 
Herfried K. Wagner said:
ADO.NET group:

<news://msnews.microsoft.com/microsoft.public.dotnet.framework.adonet>

I think you can _not_ compact an access database with ADO.NET.


Ray, you can use JRO ("Microsoft Jet and Replication Objects 2.6 Library")
via COM interop to compact a database. See JRO.JetEngine.CompactDatabase.
 
* "Armin Zingler said:
I think you can _not_ compact an access database with ADO.NET.

I know that... But I think that's the better place to ask the question.

;-)
Ray, you can use JRO ("Microsoft Jet and Replication Objects 2.6 Library")
via COM interop to compact a database. See JRO.JetEngine.CompactDatabase.

ACK.
 
¤ hi,
¤
¤ i have an access database file attached to an app via ado, that needs to be
¤ compacted and repaired from time to time. in regular vb i would do it thru
¤
¤ DBEngine.CompactDatabase sDataBaseBackupFile, sDatabaseFile
¤ how do this in vb .net ado ?
¤
¤ i would appreciate a snippet of code, and if i have to add a referencer in
¤ my solution to some specific file.
¤

Here is the MS KB article:

HOW TO: Compact a Microsoft Access Database by Using Visual Basic .NET
http://support.microsoft.com/default.aspx?scid=kb;en-us;306287&Product=vbNET


Paul ~~~ (e-mail address removed)
Microsoft MVP (Visual Basic)
 
Back
Top