Subject | RE: [IBO] continue of my problem AND edit_mode of the grid is false |
---|---|
Author | Helen Borrie |
Post date | 2001-01-21T23:01:45Z |
At 12:37 AM 22-01-01 +0200, you wrote:
(perhaps) or nothing for the second request for these two columns - you
have no table specifiers on the the first_name and last_name columns. In
JOIN statements you must include table specifiers and SELECT * is **not** a
good practice.
Re-do the statement with a specific column list, specifying exactly which
columns you want from each table.
e.g.
select events.field1, events.field2, ...etc.,
person_info.first_name, person_info.last_name
FROM events join person_info on
events.person_id = person_info.person_info_id
KeyRelation. (Unless you use a stored procedure, you can only update one
side of a JOIN).
Also, be very particular about your KeyLinks - the specified columns must
be able to identify each output row uniquely. From your description, it
appears your KeyLinks should be person_info.person_id and events.event_id
(or whatever column is the primary key for events).
what a subselect is...
the new and old values and pass parameters to a stored procedure or to a
batch routine of some kind.
Editing in grids is "spreadsheet technology" and generally is a poor
practice in client/server. It is better to link the same datasource to
controls in editable single-row display.
Helen
InterBase Developer Initiative ยท http://www.interbase2000.org
_______________________________________________________
>Hello!You have created ambiguity here - this statement will return twice
> I did not use procedure.
> i have person_info on one table, and in the second i have events number.
> event relation to person_info is many to one.
> I remove all my work. This was something like this:
>
> SELECT events.* , first_name, last_name FROM events join person_info on
> events.person_id = person_info.person_info_id.
> I set RequestLive to true, and KeyRelation to
> person_info.person_info_id (or events.person_id).
(perhaps) or nothing for the second request for these two columns - you
have no table specifiers on the the first_name and last_name columns. In
JOIN statements you must include table specifiers and SELECT * is **not** a
good practice.
Re-do the statement with a specific column list, specifying exactly which
columns you want from each table.
e.g.
select events.field1, events.field2, ...etc.,
person_info.first_name, person_info.last_name
FROM events join person_info on
events.person_id = person_info.person_info_id
> And put some SQL for the update and insert SQL.Make sure that the update SQL applies only to the table specified in
KeyRelation. (Unless you use a stored procedure, you can only update one
side of a JOIN).
Also, be very particular about your KeyLinks - the specified columns must
be able to identify each output row uniquely. From your description, it
appears your KeyLinks should be person_info.person_id and events.event_id
(or whatever column is the primary key for events).
> could i put in this table other join to the names of the events from otherYou could do this with a subselect. Let us know if you don't understand
>table, and select the type of the event with lookup?
what a subselect is...
>I Would want edit data from the query inside the grid itself.It could be done but but you will have to write handlers to take control of
>Coulf it be done?
the new and old values and pass parameters to a stored procedure or to a
batch routine of some kind.
Editing in grids is "spreadsheet technology" and generally is a poor
practice in client/server. It is better to link the same datasource to
controls in editable single-row display.
Helen
>-----Original Message-----All for Open and Open for All
>From: Claudio Valderrama C. [mailto:cvalde@...]
>Sent: Sunday, January 21, 2001 11:35 PM
>To: IBObjects@egroups.com
>Subject: RE: [IBO] continue of my problem AND edit_mode of the grid is false
>
>
>Since it's hard to guess your settings, can you post your main SQL statement
>and your *SQL properties? Are you calling a procedure or not? If not, did
>you set KeyRelation and RequestLive?
>
>C.
>
> > -----Original Message-----
> > From: Meir Kalter [mailto:meir_klt@...]
> > Sent: Domingo 21 de Enero de 2001 4:39
> >
> > I solved my first problem after i give a special SQL for the update and
> > insert.
> > Now all i have is problem how to enable the editing inside the grid.
> > I can not edit nothing inside the grid ,
> > when i add JOIN to the query.
> > Please , help me!!!!!!!!
> >
> >
> >
> >
>
>
>
>
>
InterBase Developer Initiative ยท http://www.interbase2000.org
_______________________________________________________