PC Review


Reply
Thread Tools Rate Thread

compact a Microsoft Access database through odbc

 
 
Michael Meckelein
Guest
Posts: n/a
 
      27th Sep 2005
Hi,



My csharp application access a MS Access database through odbc connection.
Is there a way to compact the Access database after deleting records using
the odbc connection?



I found out how to do this with Microsoft Jet and Replication Objects
Library [1], but unfortunately it seems that there is no way with ODBC.



Any glue how this can be achieved are very welcome.



Michael



[1] How to compact a Microsoft Access database by using Visual Basic .NET

http://support.microsoft.com/default...;en-us;Q306287


 
Reply With Quote
 
 
 
 
Michael Meckelein
Guest
Posts: n/a
 
      28th Sep 2005
> My csharp application access a MS Access database through odbc connection.
> Is there a way to compact the Access database after deleting records using
> the odbc connection?

[snip]
> Any glue how this can be achieved are very welcome.


I have done a lot of research about this topic. Unfortunately I found no
solution. I found many issues on this topic. Some people use
SQLConfigDataSource [1] to compact the database via odbc. But in my case I
have to use an already existing system DSN. The path to the database is
unknown. Therefore I can't use this approach nor the JetEngine.



Any hint/suggestion/... is highly appreciated.



BTW: Just have the idea to read out the database path from the ODBC source.
Is this possible? Then I can use this as a workaround, read out the path and
then use theJetEngine.



Thanks in advance,

Michael


[1] SQLConfigDataSource(NULL,ODBC_ADD_DSN,(LPSTR)"Microsoft Access Driver
(*.mdb)",
"COMPACT_DB=C:\\source.mdb C:\\dest.mdb General\0\0");


 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
ERROR [HY000] [Microsoft][ODBC Microsoft Access Driver]General error Unable to open registry key 'Temporary (volatile) Jet DSN for process 0xffc Thread 0x228 DBC 0x437b94 Jet'. ERROR [IM006] [Microsoft][ODBC Driver Manager] Driver's SQLSetConnectAttr bazzer Microsoft ASP .NET 0 30th Mar 2006 04:16 PM
ERROR [HY000] [Microsoft][ODBC Microsoft Access Driver]General error Unable to open registry key 'Temporary (volatile) Jet DSN for process 0x8fc Thread 0x934 DBC 0x437b94 Jet'. ERROR [IM006] [Microsoft][ODBC Driver Manager] Driver's SQLSetConnectAttr bazzer Microsoft ASP .NET 1 24th Mar 2006 04:20 PM
ERROR [HY000] [Microsoft][ODBC Microsoft Access Driver]General error Unable to open registry key 'Temporary (volatile) Jet DSN for process 0x8fc Thread 0x934 DBC 0x437b94 Jet'. ERROR [IM006] [Microsoft][ODBC Driver Manager] Driver's SQLSetConnectAttr bazzer Microsoft ASP .NET 0 24th Mar 2006 02:22 PM
ERROR [HY000] [Microsoft][ODBC Microsoft Access Driver] Could not delete from specified tables. jwtulp@hotmail.com Microsoft Access 2 10th Feb 2006 03:36 PM
[Microsoft][ODBC Microsoft Access Driver] Cannot open database ‘(unknown)’. Narendra Microsoft Access Getting Started 1 1st Mar 2005 05:29 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 10:07 AM.