I am using version 11.10 with C++ Builder XE5 (and XE6). I have some code similar to this

Query1->SQL->Text = "Select * from abc";
Query1->Open();
Query1->Close();
Query1->AdsCloseSQLStatement();
Then I try to PKZIP the files while my .EXE is still running, and the files are in use and cannot be added to the ZIP file.

Is there another way to close the connection to the table so it is not locked?

Thanks!

asked 08 Jul '14, 20:38

David_in_WI's gravatar image

David_in_WI
56337
accept rate: 0%

edited 09 Jul '14, 00:56

Joachim%20Duerr's gravatar image

Joachim Duerr
8.7k1031133


Not sure with local server, but with remote you should also call AdsCloseCachedTables on connection level. IIRC local server still holds the file for a couple of seconds (until it's flushed to disk).

link

answered 09 Jul '14, 00:58

Joachim%20Duerr's gravatar image

Joachim Duerr
8.7k1031133
accept rate: 18%

This says the files should be available for use by other applications

http://devzone.advantagedatabase.com/dz/webhelp/advantage8.1/mergedProjects/ace/api3/adsclosesqlstatement.htm

So I think it may be a bug, the AdsCloseSQLStatement does not appear to work with Local Server. I waited several minutes and the file is still locked (Can't be pkzipped).

Even if create the query with 'new', then delete the query, the file is still locked.

Thanks!

link

answered 18 Oct '14, 18:47

Davi%20in%20Wisconsin's gravatar image

Davi in Wisc...
868812
accept rate: 0%

edited 18 Oct '14, 22:18

Your answer to the original question.
If responding to a request for additional information, please edit the question or use the comment functionality.
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "Title")
  • image?![alt text](/path/img.jpg "Title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×325
×79

Asked: 08 Jul '14, 20:38

Seen: 1,960 times

Last updated: 18 Oct '14, 22:18

Advantage Developer Zone Contact Us Privacy Policy Copyright Info


Powered by Advantage Database Server and OSQA
Disclaimer: Opinions expressed here are those of the poster and do not necessarily reflect the views of the company.