Using Set Relation To ??????

This forum is for general support of Xbase++
Post Reply
Cliff Wiernik
Posts: 605
Joined: Thu Jan 28, 2010 9:11 pm
Location: Steven Point, Wisconsin USA

Using Set Relation To ??????

#1 Post by Cliff Wiernik »

I have never used set relation since back in the clipper days when they had some problems with it. I instead do manual lookup or set scope as needed.

I was just wondering how many users use set relation or if it is just something that is really not used that much.


User avatar
Site Admin
Posts: 4733
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA

Re: Using Set Relation To ??????

#2 Post by rdonnay »

I don't use it either. I'm not convinced that it is 100% reliable in Xbase++.

Also, you have to be careful to clear relations before closing files or a runtime error could occur.
I haven't worked with SET RELATION in a long time so it may be possible that those issues have already been resolved.
The eXpress train is coming - and it has more cars.

Posts: 1185
Joined: Thu Jan 28, 2010 1:22 am
Location: Sijsele, Belgium

Re: Using Set Relation To ??????

#3 Post by skiman »


I'm using set relations in my reporting system. It worksas it should. Never had any problems with it.

Reporting is only reading, there is never an update of the data when these relations are set.
Best regards,


User avatar
Posts: 151
Joined: Thu Jan 28, 2010 10:27 am
Location: NYC

Re: Using Set Relation To ??????

#4 Post by sdenjupol148 »

Hey Cliff,

I experimented with SET RELATION in the Medallion software.
It worked just fine but I was more interested to see if using it was any faster than setting scopes and looking things up manually.
It wasn't but I left the code in anyway; it's the only place where I use it.


Posts: 534
Joined: Thu Jan 28, 2010 9:34 am

Re: Using Set Relation To ??????

#5 Post by omni »

I use it only on a few browse screens for code descriptions and it has always worked. Do not use it on reports.


User avatar
Posts: 87
Joined: Wed Apr 27, 2022 10:12 am
Location: Negotin, Serbia

Re: Using Set Relation To ??????

#6 Post by SlavkoDam »


SET RELATION works great and I use it all the time since the old Clipper87 days. :D I use it in all read, update and delete operations without any problems. From the parent DBF you can set multiple (up to 7) child relations. Data from the child DBFs are referenced with the alias operator -> . When relation(s) are no more needed you have to close them and can set another one in the same function.

DBFs are RELATION database files and SET RELATION is the most important tool for database navigation and searching in all RELATION databases. SQL databases are also RELATION and they cannot work without relations. Using SET RELATION saves a lot of programming work you have to do for manual lookup or scoping. The most benefit is in creating browsers and other reports. Besides, if you don't use relations in a relation database software, why do you use that software at all.
Best regards,

Slavoljub Damnjanovic
SD-SoftDesign, Alaska Software Technology Partner

Post Reply