Subject | Re: [IBO] Params |
---|---|
Author | Lucas Franzen |
Post date | 2001-07-19T00:05:02Z |
Gordon,
Gordon Hamm schrieb:
1. if you just to make a "plain" query (just select .. from ONE Table)
insertable/updatable then you don't need these properties!
It's enough to set the RequestLive property to TRUE (as with TQueries)
You can also achieve this by adding FOR UPDATE to your SQL-statement
(SELECT * FROM CUSTOMER [WHERE ... ] FOR UPDATE)
2. If you want to make a join :
SELECT *
FROM CUSTOMER C
LEFT JOIN ADRESS A ON C.ADRESS_ID = A.ADRESS_ID
FOR UPDATE
updatable (on the customer side) then open the QueryEditor (Click the
property SQLEditor).
Go to the SQL-UpdateSQL page and click on the GENERATE FOR TABLE button.
Select CUSTOMER then by double-clicking it.
he table now by selecting and double clicking it.
When doing so there will be entered automatically:
in EditSQL:
UPDATE CUSTOMER SET
CUST_ID = :CUST_ID,
...
in InsertSQL:
INSERT INTO CUSTOMER(
CUST_ID,
...
)
VALUES (
:CUST_ID,
...
);
in DeleteSQL:
DELETE FROM CUSTOMER
WHERE
CUST_ID = :OLD_CUST_ID
By doing so all your data aware controls that will be part of the
insert/update statement will be editable now (if you'd omit the CUST_ID
in the EditSQL for example you copuld enter a value in the appropriate
control when INSERTING a new record but NOT when editing it).
I could carry on like this for hours, but once again: look at the
GettingStarted Guide AND the samples to see how powerfuzl IBO is.
IBO can't be explained by a shiny helpfile, IBO hast to be
experienced...
Regards
Luc.
Gordon Hamm schrieb:
>No.
> Ok, so maybe Im dealing with this in the wrong way..Im using ONE TIBOQuery
> component to do my View (using my SQL property)
> Then use the Edit method with the EditSQL, then Delete method with DeleteSQL
> etc. All using the same instance of TIOBQuery..
> This is also the instance that my data aware components are looking to.
>
> Should I be using two different instances , one for the data aware, and
> another for Add, Edit Delete using the SQL propery to do ALL of these
> actions?
1. if you just to make a "plain" query (just select .. from ONE Table)
insertable/updatable then you don't need these properties!
It's enough to set the RequestLive property to TRUE (as with TQueries)
You can also achieve this by adding FOR UPDATE to your SQL-statement
(SELECT * FROM CUSTOMER [WHERE ... ] FOR UPDATE)
2. If you want to make a join :
SELECT *
FROM CUSTOMER C
LEFT JOIN ADRESS A ON C.ADRESS_ID = A.ADRESS_ID
FOR UPDATE
updatable (on the customer side) then open the QueryEditor (Click the
property SQLEditor).
Go to the SQL-UpdateSQL page and click on the GENERATE FOR TABLE button.
Select CUSTOMER then by double-clicking it.
he table now by selecting and double clicking it.
When doing so there will be entered automatically:
in EditSQL:
UPDATE CUSTOMER SET
CUST_ID = :CUST_ID,
...
in InsertSQL:
INSERT INTO CUSTOMER(
CUST_ID,
...
)
VALUES (
:CUST_ID,
...
);
in DeleteSQL:
DELETE FROM CUSTOMER
WHERE
CUST_ID = :OLD_CUST_ID
By doing so all your data aware controls that will be part of the
insert/update statement will be editable now (if you'd omit the CUST_ID
in the EditSQL for example you copuld enter a value in the appropriate
control when INSERTING a new record but NOT when editing it).
I could carry on like this for hours, but once again: look at the
GettingStarted Guide AND the samples to see how powerfuzl IBO is.
IBO can't be explained by a shiny helpfile, IBO hast to be
experienced...
Regards
Luc.
>
> Gordon Hamm
>
> ----- Original Message -----
> From: "Jason Wharton" <jwharton@...>
> To: <IBObjects@yahoogroups.com>
> Sent: Wednesday, July 18, 2001 4:55 PM
> Subject: Re: [IBO] Params
>
> > You only have access to the params in your editsql at the time the record
> is
> > posting. Then, it only looks at the fields of the dataset being posted to
> > get its values. It would be an interesting feature to have it also try and
> > get a value from an input parameter.
> >
> > Jason Wharton
> > CPS - Mesa AZ
> > http://www.ibobjects.com
> >
> >
> > ----- Original Message -----
> > From: "Gordon Hamm" <vds@...>
> > To: <IBObjects@yahoogroups.com>
> > Sent: Wednesday, July 18, 2001 2:50 PM
> > Subject: [IBO] Params
> >
> >
> > > Hi,
> > > I am inserting several parms into the params list on a TIBOuery
> component.
> > >
> > > Then, putting some SQL code into my EDITSQL.
> > >
> > > Then when doing an edit, I am calling the
> > > parambyname('myparameter').asstring := Newvalue
> > >
> > > It returns an error saying that my parameter doesnt exist. In looking at
> > the
> > > object inspector, its clearly there. Am I missing something basic?
> > >
> > > Gordon
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > > Your use of Yahoo! Groups is subject to
> http://docs.yahoo.com/info/terms/
> > >
> > >
> >
> >
> >
> >
> > Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
> >
> >
>
>
>
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/