Board index » delphi » How do I create Interbase databases at run time?

How do I create Interbase databases at run time?

I am using Delphi 2.0 and have purchased a bunch of books on the
subject, but still can not find any information on creating Interbase
databases at run time.

I know the SQL, but by using TQuery, I believe that I need to be
already connected to a database.

How can I send an SQL command to Interbase without already being
connected to a database (without using WISQL)?

Any help would be most appreciated.

co...@teleport.com

 

Re:How do I create Interbase databases at run time?


In article <4rkh2p$...@nadine.teleport.com>
           co...@teleport.com "Cory Gondek" writes:

Quote
>I am using Delphi 2.0 and have purchased a bunch of books on the
>subject, but still can not find any information on creating Interbase
>databases at run time.

>I know the SQL, but by using TQuery, I believe that I need to be
>already connected to a database.

>How can I send an SQL command to Interbase without already being
>connected to a database (without using WISQL)?

AFAIK this is not supported unless there is a BDE call to do it.
Generally it is not a good idea to create an SQL database as part
of the main programme because in addition to the database; tables,
users, procedures and triggers will require creating.

If your client has a database administrator provide him with an ISQL
script to create the database and contents, otherwise create the .GDB
file in advance and copy it over as part of the installation script.

--
Donald Oddy
Grove Systems Ltd.                                    0161-224 4465

Re:How do I create Interbase databases at run time?


Donald R. Oddy (don...@grove.demon.co.uk) wrote:
: In article <4rkh2p$...@nadine.teleport.com>
:            co...@teleport.com "Cory Gondek" writes:

: AFAIK this is not supported unless there is a BDE call to do it.
: Generally it is not a good idea to create an SQL database as part
: of the main programme because in addition to the database; tables,
: users, procedures and triggers will require creating.

: If your client has a database administrator provide him with an ISQL
: script to create the database and contents, otherwise create the .GDB
: file in advance and copy it over as part of the installation script.

Historically, you could purchase licenses in 3.x that did not include
Gdef nor Qli. To submit changes as an ISV/VAR might to such a site
you'd have to a) rely on the existing SQL support which was not great or
b) use Gdef remotely or c) use Gdef to create Gdyn statements which
you compiled into a program which was shipped to the remote site.

InterBase has always had a routine to create a database on the fly at the
OSRI call level - see isc_create_database.

If you know how to generate dyn calls on the fly etc you could write
your own tool etc.
--
Nigel Campbell            Voice: (613) 738-1338 ext 3016   P.O. Box 9707,Stn.T
Business Intelligence       FAX: (613) 738-0002            3755 Riverside Dr.
Cognos Incorporated       Email: nig...@cognos.com         Ottawa ON K1G 4K9
http://www.cognos.com                                      CANADA

My comments are my personal opinion and are not the opinion of my employer or
anyone else.  I claim copyright in all my statements and give no one the right
to copy them (even if they are quoted elsewhere) in any medium except on
netnews or email. In particular, no one can reproduce or reprint my comments
in print or any visual medium without getting my explicit permission.

Other Threads