On Tue, May 19, 2009 at 11:09 AM, Stefan Izota stefan.izota@gmail.comwrote:
Hi Mariano,
I did not find any SqueakDBX mailing list so I decided to mail you a small problem I have.
No, we don't have our own mailing list, but I think sending your question to squeak-dev or pharo list is ok.
I tried to test SqueakDBX on latest Squeak (3.10.2-7179) and Pharo (10309 updated to 10310) images. I also used the latest VMs. I compiled postgreSQL and SQLite back-ends on Windows XP using MinGW. The dll-s resulted are: libopendbx-1.dll, libopendbxplus-1.dll, libpgsqlbackend-1.dll, libsqlite3backend-1.dll. I copied them to the VMs directories.
For postgreSQL i used:
| conn connectionSettings result aRow | connectionSettings := DBXConnectionSettings host: 'localhost' port: '5432' database: 'StDatabase' userName: 'postgres' userPassword: 'akimbo'. conn := DBXConnection platform: DBXPostgresPlatform new settings: connectionSettings. conn connect. conn open.
result := conn execute: 'insert into sttask (taskname) VALUES (''stefan'') '. result := conn execute: 'select * from stuser'. aRow := result nextRow. aRow inspect.
conn close. conn disconnect.
and everything worked fine.
I am glad to know it is working :)
For SQLite i used:
| conn connSettings result rows |
connSettings := DBXConnectionSettings new host: 'D:\sqlite\db'; database: 'test.db'.
connSettings inspect.
conn := DBXConnection platform: DBXSqlitePlatform new settings: connSettings. conn connect. conn open.
result := conn execute: 'select * from users'. rows := result rows. rows inspect.
conn close. conn disconnect.
and I got DBXFatalError: FATAL OpenDBX: Operation is not available (on both images).
Yes. This is a bug I discover in OpenDBX. Norbert (the author) has fix it and comitted in SVN. So, you can do two things:
1) checkout from svn: https://libopendbx.svn.sourceforge.net/svnroot/libopendbx/trunk/ And compile again as you did the first time. This fix will be then in OpenDBX 1.4.1 (which is not released yet)
2) I will send you the dll I compile by myself if you want it.
I can open/modifiy the SQLite db using http://sqliteadmin.orbmu2k.de/ just fine.
Do you have any idea what am I doing wrong?
Nothing. Your code is perfect. Our fault.
Regards, Stefan
I hope this helps.
Mariano
and I got DBXFatalError: FATAL OpenDBX: Operation is not available (on both images).
Yes. This is a bug I discover in OpenDBX. Norbert (the author) has fix it and comitted in SVN. So, you can do two things:
I must clarify that this only occurs in Windows with sqlite3.
Best,
Mariano
squeak-dev@lists.squeakfoundation.org