Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

VFPoledb error "The provider could not determine the Decimal value"

Skip to first unread message

Miguel

unread,
Jul 8, 2003, 12:44:35 PM7/8/03
to
Hi, I'm trying to read data from several VFP7 tables with VB.net and
this peace of code works with no problems in more than 30 tables but
there are some tables where I get an error.. the table structure is
similar I don't see the problem...although I have a lot of blank
fields records in this tables …

Dim stringFox As String = "Provider=VFPOLEDB.1;Mode=Share Deny
None;Mask Password=False;Cache Authentication=False;Encrypt
Password=False;Collating Sequence=GENERAL;DSN='';Data Source=" +
txtPath.Text

Dim confox As New OleDbConnection(stringfox)
Dim oString As String = "SELECT...FROM .... " 'Very basic
Dim oleda As New OleDbDataAdapter(oString, confox)
Dim foxtab As New DataTable()
oleda.Fill(foxtab)

the code "oleda.Fill(foxtab)" throws this Exception message -" 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."

Can anyone help me?!

Cindy Winegarden

unread,
Jul 8, 2003, 1:50:55 PM7/8/03
to
Hi Miguel,

Can you narrow the problem down to a particular row that is giving you
errors? Do you know the data type of the problem field in the Fox table? Do
you know what data type it is coming across as? Are you perhaps dealing with
NULL values? How about Empty values? An Empty VFP numeric field should
evaluate to zero but there's always a chance of a problem.

--
Cindy Winegarden MCSD, Microsoft Visual FoxPro MVP
cindy.wi...@mvps.org, www.cindywinegarden.com

"Miguel" <domi...@cabinf.nqf.pt> wrote in message
news:40e55044.03070...@posting.google.com...


> Hi, I'm trying to read data from several VFP7 tables with VB.net and
> this peace of code works with no problems in more than 30 tables but
> there are some tables where I get an error.. the table structure is
> similar I don't see the problem...although I have a lot of blank

> fields records in this tables .

Miguel

unread,
Jul 9, 2003, 7:12:50 AM7/9/03
to
Hi Cindy,
I believe the problem is the numeric data type with a decimal part, if
they have empty fields.. because all other tables where this works
don't have numbers with decimals I try converting all fields of one
table to zero just for testing purposes and still got the same error
maybe is something else or I missed a record .

Thanks for the help

Miguel

"Cindy Winegarden" <cindy.wi...@mvps.org> wrote in message news:<#DdqdmXR...@TK2MSFTNGP11.phx.gbl>...

Miguel

unread,
Jul 9, 2003, 12:45:26 PM7/9/03
to
Hi again!
I solve the problem i switch to OleDbDataReader so and i could debug
record by record and catch the exception
system.InvalidOperationException and return dbnull.value. this looks
like a simple solution but I'm new to .net so it took me some time to
figure it out. I think I panic too soon!
Thanks for the suggestions!

Cindy Winegarden

unread,
Jul 10, 2003, 11:03:14 AM7/10/03
to
Hi Miguel,

I'm glad you found something that worked. I'm new to .NET also and I've got
a lot to learn.

--
Cindy Winegarden MCSD, Microsoft Visual FoxPro MVP
cindy.wi...@mvps.org, www.cindywinegarden.com

"Miguel" <domi...@cabinf.nqf.pt> wrote in message

news:40e55044.0307...@posting.google.com...

0 new messages