Board index » delphi » How to make a new database file using TQuery

How to make a new database file using TQuery

I need a hint on how to make a new database file (.DBF) in the new
directory using TQuery.
Please forward any suggestion to do...@ibm.net.
Thank you very much.
Delphi Newbie.

 

Re:How to make a new database file using TQuery


Quote
In article <54s49m$...@boursy.news.erols.com>, jones...@erols.com wrote:
>Delphi Fan <do...@ibm.net> wrote:

>>I need a hint on how to make a new database file (.DBF) in the new
>>directory using TQuery.
>>Please forward any suggestion to do...@ibm.net.
>>Thank you very much.
>>Delphi Newbie.

>One solution is to use a TBatchMove in conjunction with the TQuery;
>Set the TQuery as the source and the desired new DBF file as the
>destination;   There is a VCL component at one of the Delphi FTP sites
>which combines the components into a TEnQuery (I think that's the
>name) which will automatically create a permanent file if the query is
>a SELECT rather than an UPDATE.  It's functionality is based on using
>the TQuery in combination with the TBatchMove..

Well, The other solution is to use :

 CREATE TABLE table (col1 INTEGER, col2 char(20), etc)

in your SQL statement, and use ExecSQL. RTFM it's all in there.

Cja,

Andre Jakobs
   MicroBrain Technologies Inc.
     The Netherlands

Re:How to make a new database file using TQuery


Quote
Delphi Fan <do...@ibm.net> wrote:
>I need a hint on how to make a new database file (.DBF) in the new
>directory using TQuery.
>Please forward any suggestion to do...@ibm.net.
>Thank you very much.
>Delphi Newbie.

One solution is to use a TBatchMove in conjunction with the TQuery;
Set the TQuery as the source and the desired new DBF file as the
destination;   There is a VCL component at one of the Delphi FTP sites
which combines the components into a TEnQuery (I think that's the
name) which will automatically create a permanent file if the query is
a SELECT rather than an UPDATE.  It's functionality is based on using
the TQuery in combination with the TBatchMove..

Hope this help...
JJB

Other Threads