[Cuis-dev] ODBC error

Mark Volkmann r.mark.volkmann at gmail.com
Sun Oct 20 04:31:40 PDT 2024


I should have asked “Is it possible that nobody that uses Cuis Smalltalk in macOS accesses relational databases?”

---
R. Mark Volkmann
Object Computing, Inc.

> On Oct 20, 2024, at 6:26 AM, Mark Volkmann <r.mark.volkmann at gmail.com> wrote:
> 
> Yikes! Sounds complicated. Can you point me to any documentation that describes how I could reference a lib path in the Open Smalltalk VM?
> 
> Is it possible that nobody that uses Cuis Smalltalk accesses relational databases?
> 
> ---
> R. Mark Volkmann
> Object Computing, Inc.
> 
>>> On Oct 19, 2024, at 9:46 PM, Jon Raiford via Cuis-dev <cuis-dev at lists.cuis.st> wrote:
>>> 
>> 
>> 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.
>> --
>> Cuis-dev mailing list
>> Cuis-dev at lists.cuis.st
>> https://lists.cuis.st/mailman/listinfo/cuis-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20241020/d07c2077/attachment-0001.htm>


More information about the Cuis-dev mailing list