> I have a data base table (in FoxPro DBF table) which has a definition
> of Numeric(5,1). I have understood this to mean that the total field
[quoted text clipped - 10 lines]
> Why does ADO allow you to insert a value that exceeds the field spec
> and then does not allow you to read that value?
Not sure what you are doing or what is wrong - "push"? "Efail"? ...
Are you using classic ADO or ADO.Net? Classic VB (VB6 or lower) or VB.Net?
If you are using classic ADO and VB then the first thing is to make sure you
have the latest 'n greatest FoxPro Provider:
http://msdn.microsoft.com/vfoxpro/downloads/updates/default.aspx
Second, the Numeric datatype is not directly supported in VB. The closest
match is a Decimal which is supported only in a variant. Look up "CDec()".
IIRC, the precision specification for a Numeric/Decimal is the total number
of digits - not including the decimal point (or that the +/- either). ie,
your example would be 9999.9.
Also note if using classic ADO each of the values in a Recordset is a
Variant.
If your not using classic ADO or if you are using VB.Net then you need to
post in a dotNet newsgroup.
In any case posting code will make it easier to understand what you are
doing.
hth
-ralph
DK - 26 Nov 2007 15:46 GMT
> > I have a data base table (in FoxPro DBF table) which has a definition
> > of Numeric(5,1). I have understood this to mean that the total field
[quoted text clipped - 36 lines]
> hth
> -ralph
It's VB6 and historically if the the data in the field does not match
exactly the field spec you will either get some strang EFail staus
that tells yo nothing or get no data returned in the record set.
The code is very simple "Select * from Table", if any of the rows that
would have been returned has this field no data will be returned in
the recordset but if you include all but the offending field data will
be returned.
Usually this is used to build a grid with all of the available records
in it (it does have a where clause and a limited set of fields) and
then you can select one of the rows and retrieve the balance of the
data. BUT if the row you selected has the offending field then you get
no records returned in other words you get an immediate EOF.
It makes no difference which of the various OLEDB drivers for FoxPro
gets used. I have found by experimentation that the older ODBC driver
will return data.
Ralph - 26 Nov 2007 18:11 GMT
> > "DK" <dwes...@ermco-eci.com> wrote in message
<snipped>
> It's VB6 and historically if the the data in the field does not match
> exactly the field spec you will either get some strang EFail staus
[quoted text clipped - 14 lines]
> gets used. I have found by experimentation that the older ODBC driver
> will return data.
That is strange. I've never had any particular problem of that sort with the
Numeric datatype. Without something I can reproduce I not going to be much
help.
The FoxPro guru around here is Cindy. Hopefully she will show up and help.
[Cindy Winegarden MCSD, Microsoft Visual FoxPro MVP
cindy_winegar...@msn.com www.cindywinegarden.com ]
-ralph
DK - 27 Nov 2007 14:28 GMT
> > > "DK" <dwes...@ermco-eci.com> wrote in message
>
[quoted text clipped - 30 lines]
>
> - Show quoted text -
Ralph,
I think Cindy has looked at this problem in the past just thought
there may be something new out there.