×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Create Table in interbase (runtime)

Create Table in interbase (runtime)

Create Table in interbase (runtime)

(OP)
Hi,
Im looking to create tables at runtime using CBuilder 6 and interbase, preferably using a stored procedure. Ive tried a few different methods without success and can find nothing on the net. Any advice would be appreciated.
TIA
Kris

RE: Create Table in interbase (runtime)

(OP)
OK thanks, could you give me an example of this please?
Thanks
Kris

RE: Create Table in interbase (runtime)

Try this (I am usin Delphi 6/7 and working)

Use IBSQL
Set IBSQL.SQL to some command for example

CREATE TABLE "ARTIKLI"
(
  "SIFRA"    VARCHAR(50) NOT NULL,
  "NAZIV"    VARCHAR(100) NOT NULL,
  "NAZIV_DRUGI"    VARCHAR(100),
  "MJERA"    VARCHAR(50) NOT NULL,
  "C1"    FLOAT,
  "C2"    FLOAT,
  "C3"    FLOAT,
 PRIMARY KEY ("SIFRA")
);

and then call IBSQL1.ExecQuery ;

RE: Create Table in interbase (runtime)

Hi,

You cannot do this from within a Stored Procedure - DDL (Data Definition Language) is not allwed in stored procedures.

Use SQL DDL statements (like CREATE TABLE) either one by one in a TIBQuery/TQuery/TIB_DSQL/Twhatever component or use script-components that can process the whole lot at once.

Martijn Tonies
InterBase Workbench - the developer tool for InterBase and Firebird
http://www.interbaseworkbench.com

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close