11-17-2011 06:07 PM
We are looking to integrate a service that will pull values from an external database table. Also, we would like another service to be able to update those database table values.
We are looking to integrate a service that will pull values from an external database table. Also, we would like another service to be able to update those database table values. Example. Service for ordering a Blackberry, depending on some values selected (type, model, carrier, etc) would then be able to have a pricing structure pulled in from an external table. We would like for the non technical people to be given access to another service, with which they could simply enter the data via submitting a requisition that would update the table with the data that the previous service would then be able to access.
I had a few thoughts: ISF code to executing a SQL Update, a service Link Integration that would push data to an external webservice that would then update the table, but I am specifically asking if the OOTB AFCs can be levearagted using congured datasource to write to that table instead of just read from it.
11-17-2011 06:08 PM
Here is a untested thought for SQL Server. You might be able to wrap the update code with a function and call it from a DDR via a select statement. This tricks gets around the limitation that you can't execute a stored procedure through a DDR, at least I haven't figured out how.
SELECT * FROM fn_updateMyTable (#your_form.yourupdatefield#, #your_form.yoursearchkey#)
#yourfield# is the data that you want to update. and yoursearchkey is the row to match
Then you just write a sql function to do the update(obviously a trivial example below, probably with typos). Updates are probably a little tricky since you need to depend on the searchkey value matching a unique value in your table. You might be better off doing and insert to a staging table then writing a trigger on insert
Create function fn_updateMyTable
(@searchkey varchar(10),
@updatedata varchar(10)
)
returns
@RtnTABLE TABLE
(result varchar(30)
)
as
BEGIN
update MyTable set myfield = @updatedata where mykey = @searchkey
insert into @RtnTABLE VALUES ("returnvalue")
RETURN
END
11-17-2011 06:08 PM
Hi Nelson,
Looks like there were 2 threads created for this - I responded on the other yesterday, basically, the same as Brian!
https://supportforums.cisco.com/message/3492784#3492784
Thanks
Ant
11-17-2011 06:08 PM
Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: