Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Error while creating ADO recordset with VFPOLEDB (2)
Message
 
 
To
05/06/2009 21:21:53
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Environment versions
Visual FoxPro:
VFP 9 SP1
Miscellaneous
Thread ID:
01403827
Message ID:
01404300
Views:
27
>Hi Cetin,
>
>I tried your new code and it didn't work! So I Googled "multistep operation generated errors" and ended up here:
>
>http://forums.devx.com/showthread.php?t=51579 where someone named Tejpal Mehta answered the following:
>
>
>  This error basically indicates that one of the fields is getting invalid
>  data. That is, mostly wrong datatype, like text being fed to long datatype
>  field etc.
>
>
>So I looked back at the original cursor and started deleting items from the select that created it and discovered that the following field (there were several similar to it in the SELECT) caused the problem:
>
>IIF(EMPTY(AD.BuyFrac),0.000000,ROUND(AD.Availqty/AD.BuyFrac,6)) AS AvailDetailCantidad, ;
>
>Going on the assumption that "one of the fields was getting invalid data" I changed the code to say:
>
>IIF(EMPTY(AD.BuyFrac),0000000.000000,ROUND(AD.Availqty/AD.BuyFrac,6)) AS AvailDetailCantidad, ;
>
>and the problem went away.
>
>Double checking I saw that indeed some of the records had more than one significant digit to the left of the decimal point on those fields. VFP is forgiving in that situation, reducing the number of decimal points so the number fits in the space but RecordSet.Save() and Range.CopyFromRecordSet() routines are strict.
>
>I wonder if this was the problem that Nadia ran into in the previous job.
>
>Thanks for the help,
>
>Alex
>
Actually, it could be a reason. I hope my colleague will verify if this could be a cause.
If it's not broken, fix it until it is.


My Blog
Previous
Reply
Map
View

Click here to load this message in the networking platform