> Hi Ingres Gurus:
> What I want to do:
> I want let users write down their comments ( 6 lines ) and save
> those comments.
> What I am trying to do:
> 1. create a 6 lines box through 'vifred'
> 2. let users write their comments into box
> 3. save users' input
> What I have done:
> 1. created a 6 lines box through vifred.
> Do you have experience about use Ingres 4GL to handle item 2 and item 3 ?
> Thanks.
> -Jane
First of all I will assume that the field in the box is 1 field using a
format
such as c240.40 so that the resulting field is 6 lines by 40 characters.
The
following is a template for some code that should perform the desired
functions:
-----
initialize (errno = integer not null with default,
rcount = integer not null with default,
...other variables...) = {
...frame initialize code...
Quote:}
'Save' = {
insert into tbl_nm (fld1, fld2, ...)
values (fld1, fld2, ...., FieldFromForm, ...);
inquire_ingres (errno = errorno, rcount = rowcount);
if errno != 0 then
rollback;
/* perform error handling */
elseif rcount = 0 then
commit;
message 'No Rows Inserted...' with style = popup;
endif;
commit;
resume;
Quote:}
'End' = { return; }
-----
Hope this helps.
Jerry.
------------------------------------------------------------------------------
Jerry Bull, MTS voice: (303) 541-6611
U S WEST Advanced Technologies fax: (303) 541-6441
4001 Discovery Drive Suite 390 email:
Boulder, Colorado 80303
------------------------------------------------------------------------------