Can I create Paradox table from dynamic SQL-query ? (message body is empty) 
Author Message
 Can I create Paradox table from dynamic SQL-query ? (message body is empty)



Sat, 25 Jul 1998 03:00:00 GMT  
 Can I create Paradox table from dynamic SQL-query ? (message body is empty)

Sure you can. For example, the SQL below would create a Paradox table named
SQL_TEST with a primary index based on its first column.

  CREATE TABLE SQL_TEST
  (
    KEYFIELD CHAR(3),
    DATA CHAR(20),
    PRIMARY KEY (KEYFIELD)
  )

Resetting the SQL property of the TQuery would also allow insertion of new
rows using Delphi code and components.

  procedure TForm1.Button1Click(Sender: TObject);
  begin
    with Query1 do begin
      ExecSQL;
      SQL.Clear;
      SQL.Add('INSERT INTO SQL_TEST');
      SQL.Add('(KEYFIELD, DATA) VALUES ("AAA", "Data value")');
      ExecSQL;
      SQL[1] := '(KEYFIELD, DATA) VALUES ("BBB", "Data value")';
      ExecSQL;
      SQL[1] := '(KEYFIELD, DATA) VALUES ("CCC", "Data value")';
      ExecSQL;
    end;
    with Table1 do begin
      Close;
      TableName := 'SQL_TEST';
      Open;
    end;
  end;

**************************************************************************
Steve Koterski                    "Knowledge advances by steps, and not by
Product Group Manager             leaps."
Delphi Technical Support                       -- Lord Macaulay, 1800-1859
Borland International, Inc.



Tue, 28 Jul 1998 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Creating Empty Table with Structure of existing table

2. Paradox Table and Dynamic SQL request.

3. joining a paradox table to an MSAccess table in an SQL query

4. how: create Interbase from Paradox table per SQL

5. Can I use SQL to create paradox tables?

6. SQL.Open *no* error with empty query?

7. Delphi1 and SQL-Date ind Query for paradox table

8. Sql Query on paradox table

9. Empty Table not the same DB desktop empty

10. DElphi 3 paradox table empty fields Variant Conversion error

11. Best way to empty Paradox table ?

12. Dynamic SQL query of DELPHI 1.0..............

 

 
Powered by phpBB® Forum Software