Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Remote views and null values
Message
From
07/02/2000 14:48:36
Jorge Haro
Independent Consultant
Juarez, Mexico
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Remote views and null values
Miscellaneous
Thread ID:
00328428
Message ID:
00328428
Views:
54
Hi all, basically I have two problems:

1. When I try to insert a record I get a message about "field .. does not accept null values", so I tried SET NULL OFF, which AFIK inserts blanks rather than NULLS, but that didn't work. So I had to put something like:
scatter memvar
blank
gather memvar
before the save code, and it worked, I didn't like it very much, but it worked.

How can I avoid this?

2. The second is about the view designer using SELECT *, this generates an error and forces me to redefine the update criteria if I add or remove a field to the base table, needless to say it's a pain when you got a lot of views, not to mention error prone.

I've tried two things, using eView (thanks Erik) to specify all the fields one by one instead of the *, that works, but I have to do this manually for every view; the other thing is adding a dummy field that I deliberately don't include in the view, so the view designer doesn't do a "select *", but guess what I get?, "ODBC error.. field dummy does not accept null values" whenever I insert a record.

Well, basically it's the same problem, but the first one happens when I include all the fields and one of the values doesn't get filled, the second one happens when I don't include all the fields in the view, so there is simply no way to fill the value for the new record.

oh, the base tables are VFP tables, let me know if you need more info, TIA
Next
Reply
Map
View

Click here to load this message in the networking platform