Re: update-record-from-instance question/gripe

Cyrus Harmon <ch-clsql-dl6SmSK5uza1Z/[email protected]>
Newsgroups gmane.lisp.clsql.devel
Message-ID <[email protected]>
Excuse my ignorance of the terminology, but what exactly do you mean 
when you say CommonSQL? Are you saying that the predecessor to clsql 
doesn't support such functionality but that clsql does? Or that clsql 
doesn't support such functionality? The workaround sounds reasonable, 
but modifying the behavior of update-record-from-instance also sounds 
reasonable.

Thanks in advance for the clarification.

Cyrus

On Dec 3, 2004, at 4:21 PM, Kevin Rosenberg wrote:

> Cyrus Harmon wrote:
>> I have a question/gripe about update-record-from-instance. Maybe I 
>> just
>> don't understand how to do what I want, but what I think I want is a
>> long-lived object that gets instantiated from tables via make-instance
>> or select with an open connection to a DB. Then I want to close that
>> connection and re-open another connection down the line. When I try to
>> update the object using update-record-from-instance, even if I supply
>> the new db connection, I fail as I think it's trying to use the old
>> connection. The docs for update-record-from-instance say that the db
>> only applies when the object isn't already associated with a database.
>> What about the case when were associated with a db via a defunct
>> connection? I'd like to be able to write this back to the database
>> without having to go through the trouble of making a new object. Does
>> this make sense?
>
> Your statement makes sense.  The CommonSQL does not support such
> functionality. You can acheive it by directly setting the
> view-database slot in the db-object.
>
> Kevin
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.