Micro Focus QTP (UFT) Forums
How to retrieve an XML data from a column in DB - Printable Version

+- Micro Focus QTP (UFT) Forums (https://www.learnqtp.com/forums)
+-- Forum: Micro Focus UFT (earlier known as QTP) (https://www.learnqtp.com/forums/Forum-Micro-Focus-UFT-earlier-known-as-QTP)
+--- Forum: UFT / QTP Others (https://www.learnqtp.com/forums/Forum-UFT-QTP-Others)
+--- Thread: How to retrieve an XML data from a column in DB (/Thread-How-to-retrieve-an-XML-data-from-a-column-in-DB)



How to retrieve an XML data from a column in DB - Ramya Devadoss - 05-10-2013

After successfully establishing connection with DB

Code:
SQL = "Select * from EMP_MESSAGEQUEUE where WHERE SALESORDERID='MCI-130425-z0S3AL13' "

If oConn.State = 1 Then    
oConn.Execute(SQL)
msgbox "executed"
selectedRows.open SQL, oConn
  do until selectedRows.eof
   EMP_val=selectedRows("EMP_PAYLOAD")
    msgbox EMP_val  
   selectedRows.movenext        
  loop
  oConn.close  
  
End If


where column EMP_PAYLOAD is of "XMLDATA" type in DB. , but at the place "oConn.Execute SQL" it is prompting error.
Also tried with executing stored procedure still the execute command is throwing an DB error. Could you please help on te executing the stored procedure.

Thanks,