Hi Sergey,
I am not at that system right now but I think we tried that. Or we got going in another direction just before we tried that. Its all so fuzzy now...:)
I will try that tomorrow morning and let you know. I do have the feeling that the OLE DB driver evaluates the variable prior to inserting it into the command string. The return error message shows part of the command like this:
UPDATE client SET nLoansYTD = IIF(ISNULL() ... too few arguments
The command is UPDATE client SET nLoansYTD = IIF(ISNULL(%loansytd%) where ...
>What error do you get?
>Try
>
>UPDATE client SET nLoansYTD = NVL(%loansytd%,0)
>
>>I have a Sharepoint form that has number fields. These are treated as text fields in Sharepoint. When saving the form values I am attempting to UPDATE the VFP tables. If the user clears the text field of a number then saves the form's data, the variable seems to be evaluated before it gets to the OLEDB UPDATE. The cleared field evaluates to a NULL value. I cannot get the OLB DB statement to work with NULL values because, it seems, that the cleared variable is evaluated PRIOR to the UPDATE command.
>>
>>Has any one come across this? Am I missing something? I'm trying to stay away from scripts in the Sharepoint form.
>>
>>OLDDB chokes on each of the following:
>>
>>UPDATE client SET nLoansYTD = %loansytd%
>>UPDATE client SET nLoansYTD = IIF(%loansytd%=.NULL., 0, %loansytd%)
>>UPDATE client SET nLoansYTD = IIF(ISNULL(%loansytd%),0, %loansytd%)
>>
Gil Munk
"If a nation expects to be ignorant and free, it expects what never was and never will be." - Thomas Jefferson