In the now ancient VP5.2 version one could use a neat little trick to save individual fact terms in an external database. In my case I saved user preferences as strings in MS SQL.
For example: (excuse the use of VP5.2 code here)
facts - report_preferences
%Save user preferences code segment
In more recent versions of VP it doesn't seem possible to handle fact terms in this way. It's certainly not a problem to check and retract each term separately but, out of curiosity, just thought I would ask in case this nice little method can still be achieved?
Code: Select all
save_preferences:- retract(DATA,report_preferences), term_str(report_preferences,DATA,DATASTR), %convert term to string insert_rpt_prefs(CID,USERID,DATASTR), %save term in SQL fail. save_preferences.