Board index » delphi » Database Desktop & Create Table based on SQL

Database Desktop & Create Table based on SQL

Hi All...

In Database Desktop, If you pick QBE and specify table and run the
query, BDE will create a table called PRIV:ANSWER.DB.

I think this is cool, since we can create join table and copy the record
at blazing speed. (Or may be somebody did faster than that.. Could U
tell me how ?).

Is there anyone tried to create a result table similarly to Borland
Database Desktop programatically ? How u do it ?

Thanks

- SA -

 

Re:Database Desktop & Create Table based on SQL


SA,

  Use the BDE procedure dbiMakePermanent:

   uses BDE;

   with Query1 do begin
      databasename := 'db';
      with sql do begin
         clear;
         add('Select * from 'MyTable.db');
      end;
      open;
      dbiMakePermanent(handle,Pchar('c:\temp\privTable.db'),TRUE);
      close;
   end;

hth,

Bob M..

Quote
SA wrote:
> In Database Desktop, If you pick QBE and specify table and run the
> query, BDE will create a table called PRIV:ANSWER.DB.

> Is there anyone tried to create a result table similarly to Borland
> Database Desktop programatically ? How u do it ?

Re:Database Desktop & Create Table based on SQL


Quote
On Tue, 25 May 1999 13:15:38 +0800, SA <shafi...@yahoo.com> wrote:
>In Database Desktop, If you pick QBE and specify table and run the
>query, BDE will create a table called PRIV:ANSWER.DB.

>I think this is cool, since we can create join table and copy the record
>at blazing speed. (Or may be somebody did faster than that.. Could U
>tell me how ?).

>Is there anyone tried to create a result table similarly to Borland
>Database Desktop programatically ? How u do it ?

One way to cause the result set of n SQL statement to be written as a
persistent table is to call the BDE API function DbiMakePermanent.

  DbiMakePermanent(Query1.Handle, 'NewName.db', True);

To make calls to BDE API functions, be sure to include the BDE wrapper unit
in the Uses section of the unit making the call.

//////////////////////////////////////////////////////////////////////////
Steve Koterski                    "My problem lies in reconciling my gross
Technical Publications            habits with my net income."
INPRISE Corporation                             -- Errol Flynn (1909-1959)
http://www.borland.com/delphi

Other Threads