Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
_tally problem in VFP 9
Message
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01218097
Message ID:
01218103
Views:
15
>I was using the code below in VFP 6 to generate
>code + 1 to my tables. _tally was working fine
>
>***********************************************
>dimension lctemp[1]
>select max(myfile.code) from myfile ;
> into array lctemp
> lctemp[1] = IIF(_tally=0,1,lctemp[1] + 1)
>replace myfile.code with lctemp
>***********************************************
>
>As migrating to VFP 9 I notice a problem
>
>A error message appear if its the first record of a table
>
>"field does not accept null values"
>
>Please help

There is a difference SQL in VFP behavior. You may change your code to
lcTemp[1] = iif(isnull(laTemp[1], 1, laTemp[1]+1)
If it's not broken, fix it until it is.


My Blog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform