On 8/27/10 10:33 AM, Ed Leafe wrote:
> On Aug 27, 2010, at 1:22 PM, Jim Byrnes wrote:
>
>>>> It may be apparent to a more experienced coder than myself but it seems
>>>> Dabo's .save() needs a table with a primary key to work. Now to put this
>>>> to use on the app I'm working on.
>>>
>>> Ooh, yeah, pk's are a definite requirement for updating records (but not 
>>> for querying).
>>>
>>> I wonder if we shouldn't be raising an exception that says something like 
>>> "Can't save
>>> a record with no KeyField defined."
>>>
>>> Thanks for following up on the problem.
>>>
>>> Paul
>>>
>>
>> It would be helpful for a newbie like myself.  I thought I was doing
>> something wrong in Dabo when it was really a table design mistake.
>
>
>       It's already sort of an exception: see http://dabo.codepad.org/xwoyZv93
>
>       The only way that that would not be triggered is if you defined the 
> PrimaryKey property for the bizobj. You said that there is no PK, so what did 
> you do for that?

Probably should be 'if not self.KeyField' instead, to catch the '' and () 
cases. 
Actually, I'm surprised that some sort of exception isn't being raised upon 
save(). 
You'd think there'd be a database exception with sql that includes a field name 
that 
doesn't exist...

Paul

_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users
Searchable Archives: http://leafe.com/archives/search/dabo-users
This message: http://leafe.com/archives/byMID/[email protected]

Reply via email to