Board index » delphi » Creating databases at runtime with BDE

Creating databases at runtime with BDE

Hi,

I'm new to using the BDE and have got a bit of a problem. What I want
to know is- is it possible to create database files at runtime and can
anyone
tell me how or at least point me at some resources.

Specifically what I'm trying to do is create an MDI application where
most of the child windows are either opening existing flatfile databases or
creating new ones. There are four different kinds tables I want to be able
to create/open, but at design time I cannot know what filenames the
databases will have.

In any case, thanks in advance :p

Michael

 

Re:Creating databases at runtime with BDE


Quote
> I'm new to using the BDE and have got a bit of a problem. What I want
> to know is- is it possible to create database files at runtime and can
> anyone tell me how or at least point me at some resources.

Hi,

Run Table.CreateTable method. But first you must have Table.FieldDefs filled
and - if you will use indexes - Table.IndexDefs. You may:

1. Have pattern for this tables you will use (with filled FieldDefs and
IndexDefs), then write DatabaseName and TableName property, and -
CreateTable
2. Fill FieldDefs and IndexDefs in the code.

If you have restricted number of tables, you may use, I suggest you first.
In design-time you may fill table properties, and in code you only write
DatabaseName, TableName and just run CreateTable.

Also try CreateTable+F1 for more details I may forgot.

--
Regards  - Zbig

Re:Creating databases at runtime with BDE


Thanks Zbig, that was what I was looking for (though I haven't actually
tried it yet) :)

Quote
"Zbigniew Jastrzbski" <zbigniew.jastrzeb...@wp.pl> wrote in message

news:9f23t4$1hc2$1@news2.ipartners.pl...
Quote
> > I'm new to using the BDE and have got a bit of a problem. What I want
> > to know is- is it possible to create database files at runtime and can
> > anyone tell me how or at least point me at some resources.

> Hi,

> Run Table.CreateTable method. But first you must have Table.FieldDefs
filled
> and - if you will use indexes - Table.IndexDefs. You may:

> 1. Have pattern for this tables you will use (with filled FieldDefs and
> IndexDefs), then write DatabaseName and TableName property, and -
> CreateTable
> 2. Fill FieldDefs and IndexDefs in the code.

> If you have restricted number of tables, you may use, I suggest you first.
> In design-time you may fill table properties, and in code you only write
> DatabaseName, TableName and just run CreateTable.

> Also try CreateTable+F1 for more details I may forgot.

> --
> Regards  - Zbig

Re:Creating databases at runtime with BDE


I have a tool that creates the code for making a table at runtime from a
"master" table. It works for paradox en dbase files. You will find it here :
http://us.f1.yahoofs.com/users/de11b059/bc/My+Documents/tablecode.zip...
7AZTOXCNNI the source code is incuded.

Ren

Re:Creating databases at runtime with BDE


"Ren" <rene1...@yahoo.com> schreef in bericht
news:8vBS6.168096$y7.1144468@dbsch1.home.nl...

Quote
> I have a tool that creates the code for making a table at runtime from a
> "master" table. It works for paradox en dbase files. You will find it here
:

http://us.f1.yahoofs.com/users/de11b059/bc/My+Documents/tablecode.zip...
Quote
> 7AZTOXCNNI the source code is incuded.

> Ren

The URL doesn't  work try this one : http://briefcase.yahoo.com/rene100m and
look in the folder my documents for the file tablecode.zip

Other Threads