December 31, 2007, 03:43 AM
Majid JeddiUpdating a table using webfocus
Hi,
I have a sql server stored procedure that inserts a record in a table that has 3 fields.
The values of these 3 fields are supplied to the stored procedure when it is called.
I would like to define an html file which has 3 drop down list. The user can select the values and then click on "RUN" to transfer these values to the stored procedure which will insert a new line in the table.
I have neve done this with webfocus and would like to ask you for an advice on how to do it.
Best Regards.
Majid.
December 31, 2007, 04:29 AM
FrankDutchIt's a MAINTAIN function, which is a separate piece of program from information builders.
If you have it, you can do this.
December 31, 2007, 10:14 AM
FernandoMajid,
Create a fex like this:
-DEFAULT &VAL1=A
-DEFAULT &VAL2=B
-DEFAULT &VAL3=C
ENGINE SQLMSS SET DEFAULT_CONNECTION YOURADAPTER
SQL SQLMSS EX YourSQlProc &VAL1.EVAL, &VAL2.EVAL, &VAL3
;
...
If your Proc returns a value then you can see it via a TABLE FILE SQLOUT. If it does not return a value then use END after the ; instead of the TABLE FILE SQLOUT.
Fernando
January 02, 2008, 08:10 AM
Majid JeddiHi Fernando,
Excelent that what I was looking for.
Thanks a lot.
Majid.
January 02, 2008, 11:57 AM
Jason K.As a note, we're doing this with SQL Update statements so there is no need for a stored procedure on your database.
Update mytable set field1 = &VAL1.EVAL;
commit;
Pass &val1 from an HTML form. Remember, however, that the adapter's user/pass will be passed to your database so I would enable journaling on the table being modified (if you don't already).