帮我看看是怎么回事吧!!!
运行出错:实时错误‘-2147417848(80010108)
对象’OpenRead'的方法‘_DSpaDB失败
什么意思啊??
Private Function OpenSpaDB(ByVal strFileName As String) As Boolean
'strFileName 图库文件
Dim oLegend As legend
Dim i As Integer
Dim oTarget As CTarget
If oSpaDB.IsModified Then
oSpaDB.Save
End If
If Not oSpaDB.OpenRead(strFileName) Then
MsgBox "图库打开失败!"
OpenSpaDB = False
m_bNoneSpaDBOpen = True
Ini_SaveDefaultSpaDBFileName ""
Exit Function
End If
'取得图例
Set oLegend = oSpaDB.Legends("FocusNodeLegend")
m_lTargetLockedLegend = oLegend.GetOID
Set oLegend = oSpaDB.Legends("")
For i = 1 To oTargetManager.GetCount
Set oTarget = oTargetManager.GetTargetByIndex(i)
If oLegend.LoadByName(oTarget.GetLegendName) Then
oTarget.SetLegend (oLegend.GetOID)
Else
oTarget.SetLegend (0)
End If
If oLegend.LoadByName(oTarget.GetTraceLegendName) Then
oTarget.SetTraceLegend (oLegend.GetOID)
Else
oTarget.SetTraceLegend (0)
End If
Next
'关闭所有窗口
Dim bUnload As Boolean
Do
bUnload = False
For i = 0 To Forms.count - 1
If Forms(i).Name <> "MDIMainForm" Then
bUnload = True
Unload Forms(i)
Exit For
End If
Next
Loop Until Not bUnload
Ini_SaveDefaultSpaDBFileName strFileName
m_bNoneSpaDBOpen = False
OpenSpaDB = True
End Function