Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Convert FireBird database structure using VFP
Message
General information
Forum:
Visual FoxPro
Category:
Third party products
Title:
Convert FireBird database structure using VFP
Environment versions
Visual FoxPro:
VFP 6 SP5
Miscellaneous
Thread ID:
01017799
Message ID:
01017799
Views:
90
Hi Dorin

I am posting this directly to you as I don't know of any other serious VFP-FB user.

We had some time back discussed this and in the time I had suggested a utility IBRest by Bogdan which I had found online. Till recently it was working very successfully, in fact on my request Bogdan also added an option to transfer field and table descriptions to the converted databases.

Now it has so happened that FireBird has a way of naming Primary Keys which the utility is not able to tackle. I am pasting the explantion by Bogdan
As you know IBRest was created when IB 6.0 and FB 1.0 was out, 
When primary key or foreign key was created in FB 1.0 database engine save
data in RDB$RELATION_CONSTRAINTS and RDB$INDICES.
In RDB$RELATION_CONSTRAINTS constraint was saved with original name
(PK_SOMETHING or FK_SOMETHING), but in RDB$INDICES index get generic name
RDB$PRIMARYXXX or RDB$FOREIGNYYY. When IBRest search for secondary indices
it looks in table RDB$INDICES for all records where system_flag is null and
name not start with RDB$.

But then in FB1.5 this behavior was changed. Primary key or foreign key was
saved in RDB$INDICES with original name !! This is very good for using your
own plan in sql query, but it crashed IBRest and foreign keys  Now IBRest
think this is a secondary index, create them and crashed when trying to
create foreign key.
I am in a fix here I am dependent on the util and this problem does not want to go away. I have requested Bogdan but I can understand he has his own commitments.

I will come back to this, have you tackled of converting FB databases to the new structure from a sample empty database? Basically I feel this util, which is in Delphi, is pretty open source as Bogdan has personally sent me the codes. Is there any way to clone it, albiet with Bogdan's permission, in VFP?

I have studied the code, but there are few things like data structures for opening a FB database (I guess equiv. to FILE in C/C++) which I am not sure about.

I don't intend to monopolize your time but I would appreciate your feedback.
Regards
Bhavbhuti
___________________________________________
Softwares for Indian Businesses at:
http://venussoftop.tripod.com
___________________________________________
venussoftop@gmail.com
___________________________________________
Next
Reply
Map
View

Click here to load this message in the networking platform