Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Close Access file to compress

Posted on 2003-10-26
1
Medium Priority
?
161 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 240 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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…
Suggested Courses

715 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