I'm having a few problems getting the make_sql_persistent (part of
the persdb_mysql library) predicate to work as intended. I've had a
look at the people.pl example file, and my code contains the following.
At the top after loading the required libraries:
sql_persistent_location(database, db(Database, User, Password, HP)) :-
database_name(Database), mysql_user(User), mysql_password(Password),
mysql_host_and_port(HP).
...which I assume is correct. However, during my program I have:
make_sql_persistent(TypeList, NameList, database),
where TypeList and NameList have been dynamically generated earlier
(this predicate is called recursively on all tables in the database).
All works fine until I try to extract information from the database.
No matter which table I try to access, it always comes up with an
existence_error when I run the program. I've used write statements to
check the contents of TypeList and NameList and both are generated
properly, and if I remove the statements to query the database, the
program completes without error. Since I'm using the exact same method
of retrieving information as in the people.pl example (which works
without any errors), I can only assume I've done something wrong with
the make_sql_persistent predicate...
Anyone got any ideas??
Thanks in advance for any help..
--
Alan Sneath...
"Hard work pays off in the future. Laziness pays off now"