How to use Box (in a form) from 4GL ?

How to use Box (in a form) from 4GL ?

Post by Men-Jan L » Tue, 08 Jun 1993 08:58:52



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

 
 
 

How to use Box (in a form) from 4GL ?

Post by Matt Ree » Tue, 08 Jun 1993 18:57:28


|>
|> 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

I spent quite some time pulling hair out over this one myself.

In the end created six single line fields, one above the other, and put
box trim around them to make them look like one field. (If you use one,
multiline field then when the user presses 'Return' at the end of a line
they are taken to the next field - very unnatural).

Then when the user selects a 'Save' menu option, the six single fields
are concatenated into one long hidden field, which is then stored as one
field in a data table. The only thing you need to make sure of is that
you use the correct data type (can't remember if it's char or varchar or
what), otherwise all the spaces are compressed out when the fields are
concatenated.

Not an elegant solution I know, but it worked for me.

Matt Reeve.

 
 
 

How to use Box (in a form) from 4GL ?

Post by Jerry Bu » Wed, 09 Jun 1993 00:00:06




> 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
------------------------------------------------------------------------------

 
 
 

How to use Box (in a form) from 4GL ?

Post by Leslie E Murp » Wed, 09 Jun 1993 05:45:54


Quote:

> What I am trying to do:
>    1. create a 6 lines box through 'vifred'
>    2. let users write their comments into box

Jane,

As soon as you display your form on the screen, unless you have made
the field display only or invisible, you user will be able to enter
text.  Check the attributes of the field in vifred.

Quote:>    3. save users' input

Have you created a table?  If so, in your frame (of 4GL) you need a
bit of SQL, something like:

INSERT INTO <tablename>  (column-name) VALUES (:<fieldname>);

You are probably gonna want to do some reading in your SQL and 4GL
manuals.

--
Leslie E Murphy

Dept. of Oncology
McGILL University
Tel.: 514 398 6026
Fax.: 514 398 3209

 
 
 

How to use Box (in a form) from 4GL ?

Post by Robert Perlbe » Fri, 18 Jun 1993 05:42:16



> What I want to do:
>    I want let users write down their comments ( 6 lines ) and save
>    those comments.

I have an application in which I created a 1 column scrollable table
field which allows the user to enter any number of lines of comment.  I
save each row of the table field to a separate row of a comment table,
using the table field row number as a sequence number in the table.
When reading the data into the table field, I order by the sequence
number and I had to create an invisible column in the table field to
hold this column, but on output I copy the table field row number to
the sequence column of the table.

I also added a function which allows the user to edit the comment with
a text editor.  It creates a temporary table, saves the comment to the
table, uses the COPY command to copy the comment to a text file,
invokes an editor on the text file, copies the text back into the temp
table, and loads the temp table into the table field.  I use a shell
script to invoke the editor which preprocesses the text file to
eliminate trailing white space, uses the EDITOR environment variable to
determine the editor, checks the file after editing to make sure the
user hasn't created any lines longer than the column width, and gives
the user the option of fixing the file before exiting.

I would be happy to send you the code if you wish.

Robert Perlberg
Dean Witter Reynolds Inc., New York

"We don't believe the software industry is ripping off the customer."
        -- Ken Wasch, executive director of the Software Publishers Association

 
 
 

1. Using form fields from Access 2000 Project as parameter in combo box source

I have recently migrated my Access 2000.MBD to an SQL70 backend and
ADP.
This has resulted having to re-write / re-design some aspects of the
system.

My problem is:

How do I use form field names as part of the query that populates a
combo box?
This used to work fine in Access.MDB. Now with the ADP/ SQL70
combination,
most of my combo boxes which are populated by queries using form
fields do not work. I have tried the INputParameter setting, but this
did not work because the combo boxes are filed in the form.

NEED URGENT HELP.

Second problem . The Docmd.RunCommand AcFilterByForm and apply filetr
no longer work.
Any ideas on how to use the filter commands with SQL70?

Thank You,

Kwabena

2. Unencrypt password

3. Using Combo Box with Form....

4. Backup Devices

5. Using the value of a DBEdit1 box in another form

6. ADO V2.5 on NT4

7. Please comment on my ugly code- for retrieving record on a form using a combo box

8. Help om Paradox 5.0

9. Multiple Forms using Como box

10. Multiple forms using Combo boxes

11. Multiple forms Using Combo box

12. ? using multi forms in 4GL