Focal Point
Updating a table using webfocus

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/6171028362

December 31, 2007, 03:43 AM
Majid Jeddi
Updating 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.


WebFocus 7.6.5
AND WebLogic server as web server
sql2005 as database server
December 31, 2007, 04:29 AM
FrankDutch
It's a MAINTAIN function, which is a separate piece of program from information builders.

If you have it, you can do this.




Frank

prod: WF 7.6.10 platform Windows,
databases: msSQL2000, msSQL2005, RMS, Oracle, Sybase,IE7
test: WF 7.6.10 on the same platform and databases,IE7

December 31, 2007, 10:14 AM
Fernando
Majid,

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


Prod WF 8.1.04, QA WF 8.2.03, Dev WF 8.2.03
January 02, 2008, 08:10 AM
Majid Jeddi
Hi Fernando,

Excelent that what I was looking for.

Thanks a lot.

Majid.


WebFocus 7.6.5
AND WebLogic server as web server
sql2005 as database server
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).


Prod: Single Windows 2008 Server running Webfocus 7.7.03 Reporting server Web server IIS6/Tomcat, AS400 DB2 database.