我想从其中包含 XML 文件的 Oracle 数据库中获取记录。当我尝试从同一个表中获取其他列时,它会成功返回,例如数字或文本,但具有 XML 类型记录的列在执行查询时会出现非特定错误。
代码:
Dim strConn
strConn = //conn string
Dim obConnect
Dim obRecset
Set obConnect =CreateObject("ADODB.Connection")
Set obRecset = CreateObject("ADODB.Recordset")
obConnect.Open strConn
Dim queryStr
Dim i,j
For j=1 to 10
datatable.SetCurrentRow(j)
i= datatable.Value("A","Global") ------------->>>>>> taking value from datatable
queryStr = "select tran_doc_xml from transaction where tran_doc_xml like
'%Metadata%' and uniq_descr_value_desc = '"&i&"'" ----------->>>>> fetching XML type record
Set obRecset = obConnect.Execute(queryStr) ----->>>>>>> Error in this line
msgbox obRecset.Fields.Item(0)
Next
关于如何从数据库中检索 XML 记录有什么建议吗?