Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
.NULL. is causing problems
Message
From
11/10/2004 19:55:08
 
 
To
08/10/2004 09:22:37
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00949859
Message ID:
00950573
Views:
8
Tore,

I appreciate your comment, I forgot the logicals and discovered that one exists in the tables. I fixed that, but still had the problem.

Then I discovered it was actually caused by another source: Because of the nature of this app I rely heavily on SCATTER MEMVAR and GATHER MEMVAR. A couple of the table memvars happened to have the same name as forms that I'm using. It was the form names that were returning .NULL. when they were out of scope. So I've learned to be more careful about possible conflicts in memory variables, and that was the problem all along.

Thanks for your reply,
Allen


>What about logical fields?
>
>>To All,
>>
>>I created an app that uses some free tables created from Outlook export and other free tables I created myself. Outlook accepts null values and I have never used them or wanted to use them in FoxPro. I'm real, real sure I've cleaned all the nulls out of the VFP tables created originally from Outlook with a "cleaner" program and verifyed by browsing the "cleaned" tables after. There are no nulls to be seen. The "cleaner" program opens the file, scans records and looks at each field. Here's the logic,
>>
>>scan
>> for i=1 to fcount()
>> if isnull(evaluate(field(i)))
>> n=n+1
>> this.parent.count.value=n
>> this.parent.count.refresh
>> do case
>> case type(field(i))='C'
>> replace (field(i)) with ''
>> case type(field(i))='M'
>> replace (field(i)) with ''
>> case type(field(i))='N'
>> replace (field(i)) with 0
>> case type(field(i))='D'
>> replace (field(i)) with ctod(' / / ')
>> endcase
>> endif
>> endfor
>>endscan
>>
>>But, null errors occasionally pop up during my app programs and I can't figure out why. The error is cannot accept null values. So, nulls are somehow creeping in from somewhere.
>>
>>Any suggestions?
>>
>>Thanks, Allen
Previous
Reply
Map
View

Click here to load this message in the networking platform