I'm trying to read a .DBF data base using VB.NET... the code is working until I reach a column on one of the tables that is supposed to be Decimal but it is instead filled with asterisks.
The connection string and reader I'm using go like this:
Using SDBconnection As New OleDbConnection("User ID=;" & _
"DSN=;" & _
"Cache Authentication=False;" & _
"Data Source=""" & TextBox_DBLoc.Text & """;" & _
"Provider=""VFPOLEDB"";" & _
"Collating Sequence=MACHINE;" & _
"Mask Password=False;" & _
"persist security info=False;" & _
"Mode=Share Deny None;" & _
"Extended Properties=;" & _
"Encrypt Password=False")
Dim oleReader As OleDbDataReader = New OleDbCommand("Select * from " & table, SDBconnection).ExecuteReader()
Is there some way to evaluate when the data type does not correspond and then to a cast or something like that?
The table is readable in other DBF reader software and no error is showed when read. How can I do the same?
EDIT: The error message thrown by my code when it reaches the column with asterisks is this:
The provider could not determine the Decimal value. For example, the row was just created, the default for the Decimal column was not available, and the consumer had not yet set a new Decimal value.