Referential integrity on Paradox tables 
Author Message
 Referential integrity on Paradox tables

Hello group,

I have a big problem with restructuring tables in code, with BDE API
function DbiDoRestructure.
When user selects new company, i have to make an alias for that company and
create all tables with the same structure as the tables in my applcation
base alias. User can make few company aliases. I wanted to use DbiCopyTable
to copy tables to the new alias, but then Referntial Integrity is lost. Then
i tried to use DbioDoRestructure (like in the BDE API help example) to add
Referential Integrities , after DbiCopyTable. When i go to Database Desktop
and open detail table to check the structure, Referential integrity is added
but when i double click on it then Database Desktop says that there is no
referential integrity master table, even it is copied and the referential
integrity fields are shown.
Why is that  happening, and how can i fix it?

Thanks in advance (and sorry for my incorrect english)

Radovan Radic



Wed, 03 Mar 2004 19:21:08 GMT  
 Referential integrity on Paradox tables

Quote:
> Hello group,

> I have a big problem with restructuring tables in code, with BDE API
> function DbiDoRestructure.
> When user selects new company, i have to make an alias for that company and
> create all tables with the same structure as the tables in my applcation
> base alias. User can make few company aliases. I wanted to use DbiCopyTable
> to copy tables to the new alias, but then Referntial Integrity is lost. Then
> i tried to use DbioDoRestructure (like in the BDE API help example) to add
> Referential Integrities , after DbiCopyTable. When i go to Database Desktop
> and open detail table to check the structure, Referential integrity is added
> but when i double click on it then Database Desktop says that there is no
> referential integrity master table, even it is copied and the referential
> integrity fields are shown.
> Why is that  happening, and how can i fix it?

> Thanks in advance (and sorry for my incorrect english)

> Radovan Radic

I am not quite sure what are you trying to archive here.
If you need to copy tables to another alias, I suggest you create alias
and use TBatchMove. Then you can empty table if you don't need data.

Anyways, separation of tables with same structure not sounds as a good
move. Do you really need that?
For any additional information, mail me directly on Serbian language.

--
Best regards,
Emil Beli
http://www.greenhousemm.com



Thu, 04 Mar 2004 10:45:38 GMT  
 Referential integrity on Paradox tables


Quote:
>Hello group,

>I have a big problem with restructuring tables in code, with BDE API
>function DbiDoRestructure.
>When user selects new company, i have to make an alias for that company and
>create all tables with the same structure as the tables in my applcation
>base alias. User can make few company aliases. I wanted to use DbiCopyTable
>to copy tables to the new alias, but then Referntial Integrity is lost. Then
>i tried to use DbioDoRestructure (like in the BDE API help example) to add
>Referential Integrities , after DbiCopyTable. When i go to Database Desktop
>and open detail table to check the structure, Referential integrity is added
>but when i double click on it then Database Desktop says that there is no
>referential integrity master table, even it is copied and the referential
>integrity fields are shown.
>Why is that  happening, and how can i fix it?

It's not what you asked but what if you keep somewhere your empty
tables and just copy these empty tables to the new destination dir


Thu, 04 Mar 2004 19:58:20 GMT  
 Referential integrity on Paradox tables


Quote:


> >Hello group,

> >I have a big problem with restructuring tables in code, with BDE API
> >function DbiDoRestructure.
> >When user selects new company, i have to make an alias for that company
and
> >create all tables with the same structure as the tables in my applcation
> >base alias. User can make few company aliases. I wanted to use
DbiCopyTable
> >to copy tables to the new alias, but then Referntial Integrity is lost.
Then
> >i tried to use DbioDoRestructure (like in the BDE API help example) to
add
> >Referential Integrities , after DbiCopyTable. When i go to Database
Desktop
> >and open detail table to check the structure, Referential integrity is
added
> >but when i double click on it then Database Desktop says that there is no
> >referential integrity master table, even it is copied and the referential
> >integrity fields are shown.
> >Why is that  happening, and how can i fix it?

> It's not what you asked but what if you keep somewhere your empty
> tables and just copy these empty tables to the new destination dir

Yes, i ve been thinking that way, and this is solution, but i want it to be
"professional" :)
I could zip these tables, and unzip when i need it, but i have to deploy zip
and unzip dll files to make it.
Or i can have directory with these tables, and copy from it when i need it,
but i dont want to someone notice this directory with empty tables.
I think i am on the way to solve it, if i make it i'll post code here.

Thanks,
Radovan



Thu, 04 Mar 2004 22:26:17 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. Problem: Cascading Referential Integrity with Paradox tables

2. Using the BDE to add referential integrity to Paradox tables

3. How to define Referential Integrity for Paradox table

4. Referential Integrity with Paradox Tables

5. Runtime creation of Paradox tables and Referential Integrity.

6. Paradox tables and referential integrity

7. How to create referential integrity in Paradox 5.0 Tables

8. Packing Paradox tables which maintain referential integrity

9. Why Is Referential Integrity, on Paradox Table, so difficult ?

10. Paradox, Referential Integrity, DbiDoRestructure, SQL

11. Paradox and referential integrity

12. Defining referential integrity in Paradox

 

 
Powered by phpBB® Forum Software