Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ADO and dBASE IV

Status
Not open for further replies.

scaram

Programmer
Apr 25, 2002
2
GB
I'm opening a dBase IV file using the following code;

Dim connDBase As New ADODB.Connection

connDBase.Open "Provider=Microsoft.Jet.OLEDB.4.0;" _
& "Data Source=" & gGMDataSourcePath & ";" _
& "Extended Properties=dBASE IV;"

When the code executes for the first time it crashes out with;

-2147467259 Selected collating sequence not supported by the operating
system

However when I re-run the code a second time it works fine.
Any ideas? (MDAC 2.7 + Jet 4.0 SP3, VB6)

TIA


 
Catch the error handle and try again.(That's the only way I've found):
Sub SubName

On Error GoTo errHandler

Restart:
'*** Put your code here

Exit Sub
errHandler:

'*** Retry 5 times with that error (I'm using dBase III)

If Err.Number = vbObjectError - 245755 Then
RetryCount = RetryCount + 1
If RetryCount < 5 Then
' *** Close everything you open after Restart:
Resume Restart:
End If
End If

End Sub
 
According to MS, this is a known problem within the IDE. Once the application was compiled to a .exe and run outside of the IDE, the error disappeared :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top