Solved

Close Access file to compress

Posted on 2003-10-26
1
158 Views
Last Modified: 2010-05-18
Hello Experts.

 In my program use Adotable to connect to msaccess file .
 I have a Function to compress file msAsscecc.

my question:

 How to close file msaacess before compress, I'd tried :

 Procedure TForm1.Button1Click(Sender: TObject);
 begin

 Adotable1.close;
 CompressData(filename);
......

but I get error .I know I can compress if data file not open.

 Please teach me how close access file to compress then reload it.

 Thanks.
 
 
0
Comment
Question by:z27
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 17

Accepted Solution

by:
geobul earned 60 total points
ID: 9626833
Hi,

Add TADOConnection on the form. Write ADOConnection1.ConnectionString as it was in TADOTable1. Clear ADOTable1.ConnectionString and set its Connection property to ADOConnection1. Then write:

  ADOConnection1.Close;
  CompressData(filename);

Regards, Geo
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

756 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question