Board index » delphi » Ref.-Integrity by code URGENT

Ref.-Integrity by code URGENT

Hi !

How do I set referential integrity by code ?
I know how to do this in the "Datenbankoberfl?che" but how
will this be done in delphi - bde ?

I found a lot about dbiOpenRintList and how I get existing RI's
but no information about setting them .....

Please mail back !!!

Thanks

Ciao
  Thorsten

 

Re:Ref.-Integrity by code URGENT


Setting and modifying RInt structures is under the purview of
"DbiDoRestructure."

I will encourage you to carefully experiment with Paradox's [rather weak
and rather buggy] implementation of Referential Integrity before you
choose to make an integral part of your application design ... (he said,
ominously.)

Quote
> How do I set referential integrity by code ?
> I know how to do this in the "Datenbankoberfl?che" but how
> will this be done in delphi - bde ?

> I found a lot about dbiOpenRintList and how I get existing RI's
> but no information about setting them .....

--------------------------------------------------------------------
Sundial Services :: Scottsdale, AZ (USA) :: (480) 946-8259
mailto:i...@sundialservices.com  (PGP public key available.)
Quote
> Why =shouldn't= it be quick and easy to keep your database online?
> ChimneySweep(R):  "Click click, it's fixed!" {tm}
> http://www.sundialservices.com/cs3web.htm

Re:Ref.-Integrity by code URGENT


Quote
>How do I set referential integrity by code ?
>I know how to do this in the "Datenbankoberfl?che" but how
>will this be done in delphi - bde ?

You have to use the BDE API method DBIDoRestructure.
there are some examples for using this method at
http://www.Borland.com/devsupport/bde/bdeapiex/dbidorestructure.html

--
Brian Bushay (TeamB)
Bbus...@NMPLS.com

Re:Ref.-Integrity by code URGENT


OK. That works fine !

But what do I have to do, when 2 or more fields are referenced ???
How do I change the index in that routine ? Is there a "better" solution ?

Re:Ref.-Integrity by code URGENT


Quote
>But what do I have to do, when 2 or more fields are referenced ???
>How do I change the index in that routine ?

I don't understand

Quote
>s there a "better" solution ?

Don't use referential integrity.

--
Brian Bushay (TeamB)
Bbus...@NMPLS.com

Other Threads