This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

DEVELOPERS FORUM - Executing Storedprocedure with IOM.dll

mengteh - Monday, September 17, 2007 8:54 AM:

Hi,

 I would like to know whether it is possible to execute a storedprocedure in IOM.dll? And how?

 Thank you,

Meng.



SamsAn - Tuesday, September 18, 2007 8:38 AM:

Hi, Meng.

Ways to execute a sp:

1. Direct call from the db connection (not recommended) .

2. Using SQL ItemType and IOM Item.apply method. Details are below.

  2.1. Create Item of SQL type: go to Administration/SQLs of the main innovator tree, click Create a New Item and fill the appeared form. Save. The sp is created. Note: the sp has to return a recordset (use T-SQL code like: select 'success' as result_text).

  2.2. Create a new Method. Use the code (VB version) like below to call the sp:

   Dim itm as Item = me.newitem("SQL","SQL PROCESS")
   itm.setproperty("name","name_of_your_sp")
   itm.setproperty("PROCESS","CALL")
   itm.setproperty("ARG1", "value_for_the_first_arg")
   itm = itm.apply()
   if itm.isError() then
     return itm
   end if


Hope it helps. 



mengteh - Friday, September 21, 2007 6:45 AM:

Yes, it helps. Thank you :D