Board index » delphi » Creating Interbase/ODBC databases at runtime.

Creating Interbase/ODBC databases at runtime.

I have a couple of basic questions concerning the use of Delphi with
Interbase and/or ODBC.

1. I understand how to create tables, aliases etc at run-time, but I
have been unable find out how to get Delphi to create a new database
file at runtime. Obviously you can use WISQL to create a new database
manually, but we wish to automate this process for the user. What is the
best method for creating Interbase databases at run-time?

2. We are in the process of writing a GIS which will allow users to link
GIS entities to a wide variety of data sources (Paradox tables, Oracle,
DB2 etc). The system will be configuable and so the exact data source
will not be known until runtime. Some of these data source may only be
available via OBDC links. BDE supports links to ODBC data sources, but
there seems to be some indication that this is not efficient and that
talking directly to ODBC is the only efficient method. Also what about
the problem of creating databases for all these different data sources.
How could this be achieved generically for any database system? Is there
an ODBC call to achieve this ?

Any comments ,advice or pointers to information about this subject would
be greatly appreciated.

Thanks for now

Geoff Elliott.                               Morgan Collis Group Ltd,
                                             The Mill, Millbrook Close,
                                             St. James Mill Rd,
Ph: +44 604 580-980  Fax: +44 604 589-208    Northampton NN5 5JF, Britain.

 

Re:Creating Interbase/ODBC databases at runtime.


1) See (in Delphi Developer) the help file IBCTRLS.HLP which describes
the TIBMetaData and TIBEventAlerter components. The first appears to be
what you want (allows you to create databases, etc.)  However, I'm quite
new to Delphi.

Quote
geoff wrote:

> I have a couple of basic questions concerning the use of Delphi with
> Interbase and/or ODBC.

> 1. I understand how to create tables, aliases etc at run-time, but I
> have been unable find out how to get Delphi to create a new database
> file at runtime. Obviously you can use WISQL to create a new database
> manually, but we wish to automate this process for the user. What is the
> best method for creating Interbase databases at run-time?

> 2. We are in the process of writing a GIS which will allow users to link
> GIS entities to a wide variety of data sources (Paradox tables, Oracle,
> DB2 etc). The system will be configuable and so the exact data source
> will not be known until runtime. Some of these data source may only be
> available via OBDC links. BDE supports links to ODBC data sources, but
> there seems to be some indication that this is not efficient and that
> talking directly to ODBC is the only efficient method. Also what about
> the problem of creating databases for all these different data sources.
> How could this be achieved generically for any database system? Is there
> an ODBC call to achieve this ?

> Any comments ,advice or pointers to information about this subject would
> be greatly appreciated.

> Thanks for now

> Geoff Elliott.                               Morgan Collis Group Ltd,
>                                              The Mill, Millbrook Close,
>                                              St. James Mill Rd,
> Ph: +44 604 580-980  Fax: +44 604 589-208    Northampton NN5 5JF, Britain.

Re:Creating Interbase/ODBC databases at runtime.


Quoting geoff<geoff from a message in comp.lang.pascal.delphi.databases
   >1. I understand how to create tables, aliases etc at run-time, but I
   >have been unable find out how to get Delphi to create a new database
   >file at runtime. Obviously you can use WISQL to create a new database
   >manually, but we wish to automate this process for the user. What is the
   >best method for creating Interbase databases at run-time?

You can use SQL to create an Interbase database. Just
follow the example in the Interbase manual that comes with
Delphi

Steve Pelletier
ste...@delphi.com

Re:Creating Interbase/ODBC databases at runtime.


In article <Jmh6iCACe+vxE...@mcgltd.demon.co.uk>, ge...@mcgltd.demon.co.uk
says...

Quote

>This should work fine for InterBase, but any further pointers concerning
>the creation of databases via ODBC calls would be appreciated.

Two www sites you be interested in:

http://www.guernsey.com  ODBCDirect

and

http://www.adam.co.za/odbcexpress/index.htm ODBCExpress

Each of these companies offer ODBC replacements for the BDE, they completely
replace the BDE and the regular Delphi DB Visual components, such as grids,
check boxs.. to talk to ODBC directly.  This has the benefit of not requiring
you to redistribute the BDE, and it should improve speed, both say to have seen
speeds upto 10-12x faster.  I am experimenting with ODBCExpress right now,
their example includes creation of tables at runtime for both Access and MS-SQL
server, with others slight modification maybe needed.  I think the ODBCDirect
also includes examples of creating tables.

They are both relatively cheap, ODBCDirect ~120US and ODBCExpress ~$200
for one time fee, and I beleive both come with full source with purchase.

I not sure if this is what you want, I am new to ODBC, but it seems relative.

Bye.
--
Greg Carter, CRYPTOCard Corporation
Electrical Engineer
gr...@cryptocard.com

Other Threads