General information
Category:
Databases,Tables, Views, Indexing and SQL syntax
Nancy,
Are the "date" fields in the back end data datetime instead of Date?
Use {/:} for an empty datetime field.
>Thanks for this info, Cindy. Very useful for one still on the VFP learning curve ;)
>
>I've found that I must include all fields (whether I'm using them or not--this could be just date fields, haven't tested that yet) in my remote view so I can set values that would otherwise be seen as NULL. This has worked for everything except the date fields. I still get a 1526 error (data type mismatch is the text). All other data is updated... and the dates are left blank, but the error occurs... not something I want users to deal with.
>
>I set the default for date fields to CTOD(' / / ') to match Fox 2.6's date type. I also tried setting STRICTDATE TO 0. But neither has resolved the problem. I also have the VALUE property on the textbox for the date set to =CTOD(' / / ').
>
>What else might I be missing?
>
>Thanks for any light you can shed on this.
>
>Nancy
>
>>Cetin, Nancy,
>>
>>Remote views can have default values. In the center bottom of the Fields tab in the view designer, click the Properties button. Set things to zero and blank there.
>>
>>
>>>Nancy,
>>>Remote views uses ODBC and it doesn't allow empty dates AFAIK. After scatter memvar you could loop through fields and if type is date provide {^2000/12/1899}. And maybe revert at other site to empty dates ?
>>>Hope someone else have a better idea and jumps in.
>>>Cetin
>>>
>>>>Thanks, Cetin. This seems to have cleared up the problem for all field types except date fields. Any ideas on how to force date fields to blank, not NULL?
>>>>
>>>>Again, thanks for your help.
>>>>
>>>>Nancy
>>>>
>>>>>>Hello,
>>>>>>
>>>>>>I'm working on a VFP 6 application that must reference .dbf files which are still used by a Fox 2.6 application. The VFP application must also be used across a T1 so I am using remote views to keep performance at an acceptable level.
>>>>>>
>>>>>>My problem is that VFP returns a "NULL not allowed" error on Tableupdate(). Should I be initializing every field to blank when I append a record (or check each field for NULL if editing) before issuing Tableupdate()?
>>>>>>
>>>>>>Any help or comments will be appreciated!
>>>>>>
>>>>>>Nancy Price
>>>>>
>>>>>Nancy,
>>>>>You could initialize all blank :
>>>>>select myView
>>>>>scatter memvar memo blank
>>>>>insert into myView from memvar
>>>>>Cetin
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only