Board index » delphi » AutoInc field creating Paradox table programatically

AutoInc field creating Paradox table programatically

I'm attempting to create a new Paradox table. The Primary index needs to
be an AutoInc field. I can do this from within the Database Desktop, but
have not figured how in code. I've found how to use "FieldDefs :=" and
"Assign( t.IndexDef )" and can create a new table, from an existing
tables definition. However, I lose the AutoInc definition on the first
field. It becomes translated to an Integer.

 

Re:AutoInc field creating Paradox table programatically


This is D1, D2 has fixed the problem.  In D1 use a TQuery and SQL to create
your table or (if you hate SQL) use direct bde calls.

--
Paul Motyer
pa...@linuxserver.pccity.com.au
Croydon, Australia, 3136

TL Stephan <tstep...@nanaimo.ark.com> wrote in article
<32BA2F7E.4...@nanaimo.ark.com>...

Quote
> I'm attempting to create a new Paradox table. The Primary index needs to
> be an AutoInc field. I can do this from within the Database Desktop, but
> have not figured how in code. I've found how to use "FieldDefs :=" and
> "Assign( t.IndexDef )" and can create a new table, from an existing
> tables definition. However, I lose the AutoInc definition on the first
> field. It becomes translated to an Integer.

Re:AutoInc field creating Paradox table programatically


TL Stephan <tstep...@nanaimo.ark.com> escreveu no artigo
<32BA2F7E.4...@nanaimo.ark.com>...

Quote
> I'm attempting to create a new Paradox table. The Primary index needs to
> be an AutoInc field. I can do this from within the Database Desktop, but
> have not figured how in code. I've found how to use "FieldDefs :=" and
> "Assign( t.IndexDef )" and can create a new table, from an existing
> tables definition. However, I lose the AutoInc definition on the first
> field. It becomes translated to an Integer.

I haven't seen a way to overlap that. This is a feature that comes from
BDE, not from Delphi.
I created a component called TTableEx (enclosed in my product DbTools).
This component can help you to auto-increment Integer Paradox fields.
Look at the site http://www.pax.com.br/products/dbtools.htm
To use TTableEx, before you must download DbTools (DbtLoad.zip).

-------------------==== Posted via Deja News ====-----------------------
      http://www.dejanews.com/     Search, Read, Post to Usenet

Other Threads