Using XML update the Database Tables

Using XML update the Database Tables

Page 1 of 1

0 Replies - 349 Views - Last Post: 18 April 2010 - 11:52 PM Rate Topic: -----

#1 saraharisan  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 4
  • Joined: 27-February 10

Using XML update the Database Tables

Posted 18 April 2010 - 11:52 PM

Hai Frineds,

I am working with VB Script. I have to update a database table using XML Parsing. I have given you the code that i tried. But it is not working. Kindly review it and tell me where the problem is...

Thanks in Advance :)


My Code:


dim obj_form
dim user_kid
dim arr_userkid
dim str_userkid
dim int_count
dim str_inputxml
set obj_form = document.forms("itpolicy_dura2")
user_kid=obj_form.elements("user_id").value
arr_userkid = split(user_kid,",")
if isarray(arr_userkid) then
str_inputxml=" <rpt_userid>"
for int_count = 0 to ubound(arr_userkid)
str_userkid = arr_userkid(int_count)
str_inputxml=str_inputxml & "<row row_id='" & int_count + 1& "'>"
str_inputxml=str_inputxml & "<user_id2>"&str_userkid&"</user_id2></row>"
next
str_inputxml=str_inputxml & "</rpt_userid>"
else
str_inputxml=str_inputxml & "<row row_id='" & 1& "'>"
str_inputxml=str_inputxml & "<user_id2>"&user_kid&"</user_id2></row>"
str_inputxml=str_inputxml & "</rpt_userid>"
end if 
obj_form.elements("rpt_userid").xml = str_inputxml


Is This A Good Question/Topic? 0
  • +

Page 1 of 1