MarinaKaz
13 years agoOccasional Contributor
Exception: the object was not found by Microsoft Jet
Hello, I have a problem: my DDT.CSVDriver is created successfully 8 times and I get the error at 9-th time. It doesn't depend on the field or datFile itself, it definitely depends on the function calls count. I checked that the SCVDriver is closed every time.
What can be the reason of the problem?
Function CheckField(field, datFile)
Dim pathData
Dim enter, check
pathData = "..\dat\check\"
Call Log.Message("field "&field.Name)
Set DataDriver = DDT.CSVDriver(pathData&datFile)
While Not DataDriver.EOF
Call aqObject.SetPropertyValue(field, "Text", "")
enter = VarToStr(DataDriver.Value(0))
check = VarToStr(DataDriver.Value(1))
Call field.Keys(enter)
If field.Text = check Then
Call Log.Message(VarToStr(enter) & " is entered as "&field.Text)
Else
Call Log.Error(VarToStr(enter) & " is entered as "&field.Text&", was expected "&check)
End If
Call DataDriver.Next()
WEnd
Call Log.Message(DataDriver.Name)
If Not DDT.DriverByName(DataDriver.Name) is Nothing Then
DDT.CloseDriver DataDriver.Name
End If
End Function
What can be the reason of the problem?
Function CheckField(field, datFile)
Dim pathData
Dim enter, check
pathData = "..\dat\check\"
Call Log.Message("field "&field.Name)
Set DataDriver = DDT.CSVDriver(pathData&datFile)
While Not DataDriver.EOF
Call aqObject.SetPropertyValue(field, "Text", "")
enter = VarToStr(DataDriver.Value(0))
check = VarToStr(DataDriver.Value(1))
Call field.Keys(enter)
If field.Text = check Then
Call Log.Message(VarToStr(enter) & " is entered as "&field.Text)
Else
Call Log.Error(VarToStr(enter) & " is entered as "&field.Text&", was expected "&check)
End If
Call DataDriver.Next()
WEnd
Call Log.Message(DataDriver.Name)
If Not DDT.DriverByName(DataDriver.Name) is Nothing Then
DDT.CloseDriver DataDriver.Name
End If
End Function