Subject | Re: [IBO] Problem changing data in TIB_LookupCombo and TIB_Grid components |
---|---|
Author | Helen Borrie |
Post date | 2003-03-14T22:38:47Z |
At 04:04 PM 14/03/2003 +0000, you wrote:
interface. The lookup key will poll out correctly to the Lookup dataset
but any changes requested via the UI will fail.
If you want this update to be applied from the lookupcombo, you'll need to
go and set up the columns with individual read-only statuses and leave the
polling key column editable. As long as the lookupcombo is properly set up
(via KeyLinks) to write to the polling column, this column doesn't have to
be visible in the grid...
Helen
>I am relatively new to IBO and still learning the ins and outs of it.If the grid is in read-only mode, it can't be edited from the user
>I have practically memorized the article "Configuring
>TIB_LookupCombo" and still cannot resolve the following problem. If
>anyone can tell me what I am missing, I would be very grateful - not
>to mention able to move forward again with my project!
>
>Situation: I using TIB_Grid in read-only mode
interface. The lookup key will poll out correctly to the Lookup dataset
but any changes requested via the UI will fail.
If you want this update to be applied from the lookupcombo, you'll need to
go and set up the columns with individual read-only statuses and leave the
polling key column editable. As long as the lookupcombo is properly set up
(via KeyLinks) to write to the polling column, this column doesn't have to
be visible in the grid...
Helen
>to display selected
>rows from a TIB_Query component and have other components to edit the
>fields. I am using TIB_LookupCombo components as well as some other
>controls.
>
>Problem: I am unable to change the ProgramDescription data in the
>field referenced by the LookupCombo box. The data displays correctly
>in the lookupcombo and all the values are shown correctly in the
>dropdown when selected. Yet, I am unable to change the value of the
>field.
>
>Details: (hopefully I am providing all relevant information)
>
>Using Delphi 6 with IBO v4 something (forget exactly).
>
>Primary Table (IB_Query component)
>"quProgram" with "dsProgram" as datasource
>
> Select
> (Select ProgramDescription
> from HBProgram
> where CP.ProgramID = HBProgram.ProgramID) as ProgramDescription
> , (select (Select FULLNAME FROM FORMATNAME(
> person.firstname,
> person.middlename,
> person.lastname, 'LNF'))
> from CASEMANAGER join Person P on CaseManager.PersonID =
>P.PersonID
> where CP.CaseManagerID = CaseManager.CaseManagerID) as
>CounselorName
> , CP.IsPrimary
> , CP.DATESTARTED
> . . . (many other fields ommitted)
>FROM CASEPROGRAM CP
>where CP.CaseID = :CaseID
>
>Column Attributes:
> ISPRIMARY=BOOLEAN=1,0
> ISCLOSED=BOOLEAN=1,0
> HSDFELIGIBLE=BOOLEAN=1,0
> PROGRAMDESCRIPTION=COMPUTED
> COUNSELORNAME=COMPUTED
>
>
>Lookup Table for ProgramDescription (IB_Query component)
>"quHBProgram" with data source of "dsHBProgram"
>
> SELECT ProgramCode
> , ProgramDescription
> , ProgramID
> FROM HBProgram
>
>KeyLinks: HBProgram.ProgramID=CaseProgram.ProgramID
>KeyDescLinks: HBProgram.ProgramDescription=ProgramDescription
>OrderingItems:
> PROGRAMCODE=PROGRAMCODE;PROGRAMCODE DESC
> PROGRAMDESCRIPTION=PROGRAMDESCRIPTION;PROGRAMDESCRIPTION DESC
>OrderingLinks:
> PROGRAMCODE=1
> PROGRAMDESCRIPTION=2
>
>Property KeySource: "dsProgram"
>
>
>
>DDL for relevant Tables
>
>/* Table: CASEPROGRAM */
>
>CREATE TABLE CASEPROGRAM (
> CASEPROGRAMID ID NOT NULL,
> CASEID ID NOT NULL,
> PROGRAMID ID NOT NULL,
> CASEMANAGERID ID NOT NULL,
> ISPRIMARY SMALLINT,
> DATESTARTED DATE,
> DATECLOSED DATE,
> HUDINCODE LOOKUPCODE,
> HUDINDATE DATE,
> HUDOUTCODE LOOKUPCODE,
> HUDOUTDATE DATE,
> REFERREDBYID ID NOT NULL,
> COMMENTID ID,
> CONTRACTID ID,
> CLOSE_REASON LOOKUPCODE,
> CLOSE_DESTINATION LOOKUPCODE,
> CLOSE_MONTHLYINCOME DOUBLE PRECISION,
> CLOSE_SUMMARYCOMMENTID ID,
> HSDFELIGIBLE SMALLINT,
> STEPSPHASE CHAR (1),
> INITIALCONTACTDATE DATE
>
>
>/* Primary keys definition */
>
>ALTER TABLE CASEPROGRAM ADD CONSTRAINT PK_CASEPROGRAM PRIMARY KEY
>(CASEPROGRAMID);
>
>
>/* Foreign keys definition */
>
>ALTER TABLE CASEPROGRAM ADD CONSTRAINT FK_CASEPROGRAM_CASE FOREIGN
>KEY (CASEID) REFERENCES CASE (CASEID);
>ALTER TABLE CASEPROGRAM ADD CONSTRAINT FK_CASEPROGRAM_CASEMGR
>FOREIGN KEY (CASEMANAGERID) REFERENCES CASEMANAGER (CASEMANAGERID);
>ALTER TABLE CASEPROGRAM ADD CONSTRAINT FK_CASEPROGRAM_COMMENT
>FOREIGN KEY (COMMENTID) REFERENCES COMMENT (COMMENTID);
>ALTER TABLE CASEPROGRAM ADD CONSTRAINT FK_CASEPROGRAM_CONTRACT
>FOREIGN KEY (CONTRACTID) REFERENCES REFCONTRACT (CONTRACTID);
>ALTER TABLE CASEPROGRAM ADD CONSTRAINT FK_CASEPROGRAM_ORG FOREIGN
>KEY (REFERREDBYID) REFERENCES ORGANIZATION (ORGANIZATIONID);
>ALTER TABLE CASEPROGRAM ADD CONSTRAINT FK_CLOSE_DESTINATION FOREIGN
>KEY (CLOSE_DESTINATION) REFERENCES REFCLOSEDESTINATION (REFCODE);
>ALTER TABLE CASEPROGRAM ADD CONSTRAINT FK_CLOSE_REASON FOREIGN KEY
>(CLOSE_REASON) REFERENCES REFCLOSEREASON (REFCODE);
>ALTER TABLE CASEPROGRAM ADD CONSTRAINT FK_PROGRAMID FOREIGN KEY
>(PROGRAMID) REFERENCES HBPROGRAM (PROGRAMID);
>
>
>/* Indices definition */
>
>CREATE INDEX IDX_CP_CONTRACTID ON CASEPROGRAM (CONTRACTID);
>CREATE INDEX IDX_CP_PROGRAMID ON CASEPROGRAM (PROGRAMID);
>CREATE INDEX "IDX_DateClosed" ON CASEPROGRAM (DATECLOSED);
>CREATE INDEX "IDX_DateStarted" ON CASEPROGRAM (DATESTARTED);
>
>
>/* Table: HBPROGRAM */
>
>CREATE TABLE HBPROGRAM (
> PROGRAMID ID NOT NULL,
> PROGRAMCODE LOOKUPCODE,
> PROGRAMDESCRIPTION VARCHAR (50),
>
>/* Primary keys definition */
>
>ALTER TABLE HBPROGRAM ADD CONSTRAINT PK_HBPROGRAM PRIMARY KEY
>(PROGRAMID);
>
>
>/* Indices definition */
>
>CREATE INDEX IDX_HBPROGRAM_PROGRAMCODE ON HBPROGRAM (PROGRAMCODE);
>
>regards,
>Phil Horst
>
>
>
>___________________________________________________________________________
>IB Objects - direct, complete, custom connectivity to Firebird or InterBase
> without the need for BDE, ODBC or any other layer.
>___________________________________________________________________________
>http://www.ibobjects.com - your IBO community resource for Tech Info papers,
>keyword-searchable FAQ, community code contributions and more !
>
>Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/