[Cuis-dev] ODBC error

Mark Volkmann r.mark.volkmann at gmail.com
Sat Oct 19 16:20:15 PDT 2024


I really want to learn how to access relational databases like SQLite and
Postgres from Cuis Smalltalk so I can do that as part of an HTTP
endpoint implemented using the WebClient package. I have the Cuis ODBC
package installed and have registered a DSN for my database which is
"TodoDSN". I tested it by entering `isql TodoDSN` which supposedly verifies
that it can be accessed using ODBC. That works great. I can enter "select *
from todos;" and I see the records I expect. Then I tried this in a
Workspace:

 conn := ODBCConnection dsn: dsn user: user password: password.

That gives "Error: External module not found" which comes from this code in
the class ODBCLibrary:

sqlAllocEnv: environmentHandle
    "SQLRETURN SQLAllocEnv(SQLHENV *EnvironmentHandle);"
    <cdecl: int16 'SQLAllocEnv' (SQLHENV*)>
    ^ self externalCallFailed

Can anyone explain what this is doing and what "module" it is looking for?

-- 
R. Mark Volkmann
Object Computing, Inc.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20241019/cdfa8eb8/attachment.htm>


More information about the Cuis-dev mailing list