[Cuis-dev] ODBC creating new row and accessing it

Mark Volkmann r.mark.volkmann at gmail.com
Wed Nov 6 18:14:07 PST 2024


The following code creates a connection to a specific database, creates a
new row in it, and gets back an ODBCResultSet object whose rowCount method
returns 1. I was hoping I could access the newly created row in that result
set, but I just get nil. Do I need to execute the query in a different way?
I verified that a new row was really created in the table.

conn := ODBCConnection dsn: 'TodosDSN' user: '' password: ''.
rs := conn execute: 'insert into todos (description, completed) values
("eat tacos", 0)'.
rs rowCount. 1 .
rs next. nil .

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


More information about the Cuis-dev mailing list