sql 2000移植到oracle后,执行cmd.Properties("output stream")=oStream 就报"实时错误 3265 在对应所需名称或序数的集合中,未找到项目"
sql 2000移植到oracle后,执行到cmd.Properties("output stream")=oStream 就报"实时错误 3265 在对应所需名称或序数的集合中,未找到项目",在sql 2000 中是正常的.清各位大侠帮忙!具体代码如下:
Public Function GetSQLDom(ByVal sqlStr As Variant, _
Optional ByVal vRootName As Variant, _
Optional ByVal vCommandTimeOut As Variant _
) As String
Dim Cnn As New adodb.Connection, Cmd As New adodb.Command, oStream As New adodb.Stream
Dim strRootName As String
Dim dTimeOut As Double
Dim tmpStr As String
Dim strSrc As String
strSrc = "BaseDS.BaseDAC.GetSQLDom"
If CStr(sqlStr) = "" Then
Err.Raise 10001, strSrc, "ûÓÐΪCommand¶ÔÏóÉèÖÃÃüÁî"
End If
strRootName = "Data"
If IsMissing(vRootName) = False Then
tmpStr = Trim(CStr(vRootName))
If tmpStr <> "" Then
strRootName = tmpStr
End If
End If
dTimeOut = 900#
If IsMissing(vCommandTimeOut) = False Then
tmpStr = CStr(vCommandTimeOut)
If IsNumeric(tmpStr) = False Then
If CDbl(tmpStr) > 0 Then
dTimeOut = CDbl(tmpStr)
End If
End If
End If
With Cnn
.CursorLocation = adUseClient
.Open msConnect
End With
With Cmd
Set .ActiveConnection = Cnn
oStream.Open
.CommandTimeout = dTimeOut ' 15mins
.Properties("Output Stream") = oStream
.Properties("XML Root") = strRootName
.CommandText = sqlStr
.Execute , , adExecuteStream
End With
GetSQLDom = oStream.ReadText ' •µ»Ø
End Function
--------------------编程问答-------------------- 怎么就没人回答我的问题呢??
哎,自己先顶一下拉! --------------------编程问答-------------------- 这个版块怎么搞的,怎么就是没人回答问题呢??郁闷...................................
补充:.NET技术 , VB.NET