LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

How to compact and repair a MS Access database with NI CVI 8.5 (and SQL Toolkit)

Hello

 

I'm using the SQL Toolkit with CVI 8.5 for accessing MS Access Databases.

Is there a possibility to compact and repair the .mdb file with  CVI?

 

Thanks in advance.

 

0 Kudos
Message 1 of 8
(4,859 Views)

Hello,

please describe your question more in detail.

What do you mean with “compact and repair the .mdb file”.

Can’t you access the database? Do you get any error messages?

Please give me an overview of the scenario.

 

Regards.

Ulrich

AE NI-CER

0 Kudos
Message 2 of 8
(4,826 Views)

Hello Ulrich,

 

with compact and repair I mean the MSAccess function "Compact and Repair".

Please follow the link below for more details:

http://office.microsoft.com/en-us/access-help/compact-and-repair-an-access-file-HP005187449.aspx

 

Normally you can execute this function directly in Access or with the Windows ODBC Data Sources Administrator  => "Control Panel" => "Administrative Tools" => "Data Sources (ODBC)"...

 

I want to execute this function via cvi code and not by hand ;-).

 

Thank you for your support.

Frank

0 Kudos
Message 3 of 8
(4,818 Views)

Isn't there anyone who can help me Smiley Surprised?

 

 

0 Kudos
Message 4 of 8
(4,759 Views)

This is probably of little help but in VB6 you can do this pragmatically from the DBEngine object as follows:

 

DBEngine.CompactDatabase <from name>, <to name>

 

more info here: http://support.microsoft.com/kb/158937

 

No idea what functionality is exposed through the tool kit. Worst case solution would be a VB6 DLL but not nice with the VB RTE...

 

Kevin

0 Kudos
Message 5 of 8
(4,742 Views)

how to connect for data Base and to access to it 

0 Kudos
Message 6 of 8
(3,687 Views)

hello;

what about this error 

NON-FATAL RUN-TIME ERROR: "loraRx.c", line 35, col 9, thread id 0x000011C0: Function DBConnect: (return value == -10 [0xfffffff6]). Native error code -2147467259 0x80004005 Microsoft OLE DB Provider for ODBC Drivers: [Microsoft][Gestionnaire de pilotes ODBC] Source de données introuvable et nom de pilote non spécifié??

please

0 Kudos
Message 7 of 8
(3,686 Views)

Hello naima,

please stop hijacking old existing threads with new questions!

You posted added several messages to existing, several years old threads that had little or no relation at all with the argument of the thread itself: open a new thread instead giving all the informations that can help us to understand your problems.

In this case, useful infos can be the release of CVI and the toolkit you are using, which type of database are you trying to access and way of connection (e.g. connecting to a data source created in the ODBC administrator?).



Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
0 Kudos
Message 8 of 8
(3,671 Views)