Subject |
Re: CANT UNDERSTAND ERROR MESSAGE |
From |
Mustansir Ghor <mustan31@hotmail.com> |
Date |
Sun, 11 Mar 2018 12:58:53 -0400 |
Newsgroups |
dbase.getting-started |
Dear Mervyn
It is because i am still using dbf tables and opening them directly without using database option. How to use the read write connections with tables. Certainly I would like to use them. I think I am missing out something.
Best Regards
Mustansir
Mervyn Bick Wrote:
> On 2018-03-11 1:51 PM, Mustansir Ghor wrote:
> > Dear Mervyn
> >
> > Yes you were right. It was endofset condition. I had following sql query
> >
> > select r.rno,r.name,r.bed,i.code,i.name from ipd i join register r on i.reg=r.rno where i.reg is not null
> >
> > i was updating field r.bed for a record which in course before this command could be executed had i.reg field (used in where condition) changed in by other method.
> >
> > But when I was reading on updatable queries in Local SQL help, it said
> >
> > Multi-table queries
> > ----------------------
> > All queries that join two or more tables will produce a read-only result set.
> >
> > I wonder how in my above query i was able to update r.bed
>
> When working with "proper" SQL one doesn't use the beginEdit() and
> save() methods of the rowset. Rowsets for displaying data are
> deliberately made read-only even when there is no JOIN involved. Data
> for a specific record, identified by its primary key, is updated by
> using the UPDATE tablename command via a read/write connection to the
> database. The query for the displayed rowset can then be requeried so
> that the rowset reflects the updated data.
>
> You should never be able to update a JOINed rowset when using localSQL.
> Is there any chance that you were updating the record in a different
> rowset which uses the register table?
>
> Mervyn.
>
|
|