> >   I'm trying to execute a BatchMove from a query to a table and I get a
> > "Table is busy" error respecting the destination table of the BatchMove.
> > What could be happening? I don't know where to look for an error. 

Were you able to open the table exclusively and is it open in the design
environment? Remember that the IDE is hidden not closed when you 'run'
your application from the IDE so any tables open in the IDE are still open.
 
>   No other process/app is accessing the DB. I'm trying to make a query
> (that, works fine) and save the resulting table to a disk/directory. The
> solution I found was to make an exact copy of the table from were the
> query is made (with a different file name), move the contents of the query
> to such table (the copy) with a batchmove and then just copy the file
> (.db) to were the user selects. 

I thought one of the nice features of the batchmove was to batchmove with a
filter that didn't match any records to create an empty table with matching
structure...

>   The same app in other machine should accept (that's not done yet) that
> table as an entry and add the records to a twin table in the DB. I do this
> because I found no way to create a table using the query component. If
> anyone has a better idea, it will be welcome. I don't understand why the
> "Table is busy" exception is arised when the batchmove is executed.

with Tquery.Create(nil) do try
  DatabaseName := 'SPAM';
  SQL.Add('CREATE TABLE BLAH (ID NUMBER(10) NOT NULL, TEXT CHAR(70)  DEFAULT 
''spam'')');
  ExecSQL;
finally
  Free;
end;

shame you're not using ORACLE you could create a table from a selection
query ;)

--
Aaron Scott-Boddendijk
Jump Productions
(07) 838-3371 Voice
(07) 838-3372 Fax

---------------------------------------------------------------------------
    New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
                  Website: http://www.delphi.org.nz

Reply via email to