[Cuis-dev] ODBC error

Jon Raiford raiford at labware.com
Sat Oct 19 19:38:34 PDT 2024


I assume you are on a Mac. You are running into Apple “courage“ like when they removed headphone jacks. They stop applications from using library paths that weren’t explicitly allowed when the application was compiled. In the old days you could add to the library path in your bash profile but the only way to make it work now is to add to the library path in a launch script. One potential option is to explicitly reference the homebrew lib paths in the Open Smalltalk vm and recompile it, assuming you installed the drivers using homebrew.

Jon
________________________________
From: Cuis-dev <cuis-dev-bounces at lists.cuis.st> on behalf of Mark Volkmann via Cuis-dev <cuis-dev at lists.cuis.st>
Sent: Saturday, October 19, 2024 7:20:15 PM
To: Discussion of Cuis Smalltalk <cuis-dev at lists.cuis.st>
Cc: Mark Volkmann <r.mark.volkmann at gmail.com>
Subject: [Cuis-dev] ODBC error

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/20241020/a42ea364/attachment.htm>


More information about the Cuis-dev mailing list