Hi Pascal,
Maybe the problem isn't with VFP but rather with MDAC version on PC's that expirience this problem? You can check MDAC version using Component Checker utility from
http://www.microsoft.com/downloads/details.aspx?familyid=8f0a8df6-4a21-4b43-bf53-14332ef092c9&displaylang=en. The MDAC can be donloaded from
http://msdn.microsoft.com/data/default.aspx>I'm using foxpro tables through a linked server on SQL server and for the majority of the sites I'm accessing this way, I have no problems.
>For some of them, while using exactly the same setup and tables I have problems querying the foxpro tables. It seems that foxpro doesn't give the right length of some columns to sql server, so SQl server raises errors reporting some data surpasses columnlength. Here's an example :
>
>select * from openquery(stock, 'select id from ka_det')
>raises the following error :
>
Could not get the current row value of column [MSDASQL].id from the ole DB provider MSDASQL. Conversion failed because the data value overflowed the datatype used by the provider.>id is of type n(7)
>
>if I execute :
>select * from openquery(stock, 'select str(id,7) from ka_det')
> it works
>
>I have had this problem on another table were I solved the problem with a workaround, but I would like to know why this works for 95 % the cases, and not for 5% of the rest. (the workaround i found is : select cast(id as int) from openquery(stock, 'select str(id,7) from ka_det'
>
>I've checked ODBC drivers versions, and this doesn't seem to be the problem.
>
--sb--