Forum Discussion
sguda
14 years agoRegular Contributor
Hi,
I tried to retrieve XML file link and calling existing function in the database which converts xml file to table and reads fieldvalue for specific form id through Test Complete.
This script is not giving error but not retrieving xml file or data that is created in the table due to conversion.
I tried to retrieve XML file link and calling existing function in the database which converts xml file to table and reads fieldvalue for specific form id through Test Complete.
This script is not giving error but not retrieving xml file or data that is created in the table due to conversion.
Sub Extract_XML
Dim xmlFile
Set aCon1 =
ADO.CreateADOConnectionaCon1.ConnectionString = "Provider=MSDASQL.1;Persist Security Info=False;Data Source=Eligibility"
aCon1.LoginPrompt = False
aCon1.Open
xmlFile = storages.XML("")
set Recset2 = aCon1.Execute_("SELECT dataitems FROM dbo.Form_StudentData WHERE (IDForm_StudentData = 654588)")
xmlFile = Recset2.Fields("dataitems").Value
Log.message xmlFile
Set Recset1 = aCon1.Execute_("select FieldValue from dbo.udf_GetTableFromDataItems('" & xmlFile & "') where (IDForm_FieldDefinition = 11952)")
Log.Message Recset1.Fields("FieldValue").Value
end sub