Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
BUG in Currsoradapter with zero-length/null memo fields
Message
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00788822
Message ID:
00790822
Views:
39
>>It looks like the same issue with empty character fields. Apparently Jet OLEDB provider fails when VFP tries to create zero length input parameter for ADODB.Command object. However, the same operation succeeds for SQL Server OLEDB provider. For example the code below works fine:
>
>> ...
>
>Ok, is f3 text the same as memo? There is no problem with a zero-length character field per se. It has to be memo.
>

Yes, on VFP side text data type is mapped to Memo.

>
>You say that these are not a VFP problem. But why is it that
>
>UPDATE sfproducts set proddescription=?sfproducts.proddescription where prodid=oldval(prodid,sf products)
>
>fails if proddescription is memo and a zero-length string or > 255 in length, but these do not:
>
>UPDATE sfproducts set proddescription="" where prodid=oldval(prodid,sf products)
>
>UPDATE sfproducts set proddescription=repl("*",2000) where prodid=oldval(prodid,sf products)

>
>?
>
>Where does ?sfproducts.proddescription get converted to the actual contents of the field before updating OLEDB? It gets converted by VFP, right? It looks to me like VFP must not be doing the conversion correctly. Is there any way to look at the actual command sent to OLEDB? I tried AfterUpdate and the command is the same.
>

VFP doesn't put values into command the way I suggested you to do it in BeforeUpdate event handler. It uses Parameters collection of ADODB.Command object to pass values to ADO, more specifically it calls Command.CreateParameter function to create Parameter object and then appends it into Parameters collection. For empty Memo field, Command.CreateParameter fails. Exactly the same call doesn't fail for other providers. To me it looks like provider issue.

>Anyway, I have my ap running now thanks to your help.
>

Great! Don't forget to add similar code into BeforeInsert.

>Are you with the VFP team at Microsoft? Do I need to call tech support to report this, or will you get it fixed?

We will consider to include a better workaround for this issue into VFP.

Thanks,
Aleksey.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform