I've been using ReStore with MS Access for years. Current project requires MySQL. Unfortunately, the ReStore docs only cover generating tables in Access. Are there any examples or a quick tutorial that shows how to generate tables from dolphinsmalltalk using MySQL database?
Thanks,
Mark
Hi John,address must be provided:
I should have been more specific; the server is installed on a remote server. So, I have to provide an ip address in the script to get a connection? All smalltalk clients will access the server via ip address when deployed. So can only guess the ip
aRestore := SSWReStore new.
aRestore dsn: 'dbname=test_database;hostname=192.168.1.150'.
aRestore uid: 'root'.
aRestore pwd: '123456'.
aRestore useTransactionsWithoutVersioning.
aRestore supportsFullTableRecords: true.
aRestore connect.
afterwhich, the script adds the appropriate classes:
aRestore
addClass: ClassA;
addClass: ClassB;
addClass: ClassC.
aRestore synchronizeAllClasses.
aRestore disconnect.
aRestore := nil.
I'll give this a whirl in the morning and see how it goes.
Hopefully this is the correct procedure to connect to the remote server opposed to connecting to a database on the same dev machine.
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 296 |
Nodes: | 16 (2 / 14) |
Uptime: | 90:41:56 |
Calls: | 6,658 |
Files: | 12,203 |
Messages: | 5,334,093 |