[squeak-dev] Re: FFI + ODBC problems

Andreas Raab andreas.raab at gmx.de
Tue Dec 23 06:39:02 UTC 2008

Hi Riccardo -

[Note: Riccardo had sent me a screen shot off-list]
First thing to note here is that whenever you have an error like this 
you should make a copy of SqueakDebug.log (which gets created upon 
failure) and attach this to the message. It cuts down on size since 
instead of having to make and crop a screenshot of the debugger you can 
just paste the report into your email client.

The interesting bit about this call stack is the that the last line says:

AnObsoleteExternalFunction class>>doesNotUnderstand: #getLastError

which means that somewhere the installation of the FFI went wrong. From 
what it looks like you might have installed the FFI, then ODBC, then 
unloaded the FFI again (and maybe tried to load it once more ;-) Or 
something along these lines.

As a consequence the ODBC code refers to an obsolete class and fails. To 
fix this, you need to ensure that you have the FFI loaded properly (run 
the FFITester examples to make sure everything is in a proper state) and 
then you need to recompile the ODBC package (if you are using Monticello 
you can do this from the context menu). This should fix it.

   - Andreas

riccardo.sangalli at edor.it wrote:
> Hello,
> sorry for my english and for annoying you, but I have a question about 
> FFI...
> I am a newbie in smalltalk and I tried to use Seaside to make an ODBC 
> connection.
> So we tryied to make a simple connection + query:
> | con |
>   con := ODBCConnection dsn:'testsqueak' user:'sa' password:''.
>   (con query: 'SELECT count(*) FROM Clienti') results do:[:row | 
> Transcript show: row; cr].
>   con close.
> ...but we obtained the error explained in the attachment image file.
> We use Squeak 3.9 (Seaside OneClickExperience version) + FFI loaded by 
> Squeak Map +
> ODBC for Squeak loaded with Squeak Map.
> Running that code in an old version of Squeak (3.7) everithing works...
> Do you know why?
> Maybe that are different versions of FFI?
> Maybe the call at odbc32.dll *OLD deprecated* function "*SQLAllocEnv*" 
> instead of new "*SQLAllocHandle*"?
> Thank you a lot in advance and best wishes for holidays.
> ------------------------------------------------------------------------

More information about the Squeak-dev mailing list