Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
ADO and empty dates
Message
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Titre:
ADO and empty dates
Divers
Thread ID:
00941596
Message ID:
00941596
Vues:
71
Hi,

Can anyone out there perhaps offer some help on this one....?

We are currently in the process of re-developing parts of an existing Fox 2.6 application into a new VFP8.0 application. This change also sees a move towards a n-tier structure, so that we now have very clear object hierarchies, and have seperate object layers managing data, logic, and UI etc. We are currently using ADO as the primary medium for shunting data between the layers, and when it comes to managing data within the forms, we use cursor adapter objects ( which wrap the ADO generating logic objects ) to generate cursor tables which the form fields are then bound to just as with a normal single tier Fox application. So, the cursor adapters don't talk to the underlying datasource directly, they take the ADO recordset information and generate their cursors based on this.

All this works fine, until I need to manage date information. The cursor adapters take their ADO information from the logic objects, and present this to the form as a normal cursor table. The form textboxes are then bound to the cursor fields, and the users can make their changes without any real problems. However, the fields which are of the date type, just return 31/12/1899 instead of {}, and when we try and save the cursor adapter information, the save will fail if the field contents are {}. As I cant use .null. due to the fact that i'm still talking to tables which must remain compatible with our existing Fox 2.6 system ( and of course don't support .null. values ), I appear to have a bit of a problem....!

I'm suspecting that if I modify the cursor adapter objects to work straight on the underlying tables, and cut out ADO, the problem will be rectified, but as the entire system is designed around using ADO to give us more flexibility in the longterm, I don't really want to do this.

I guess the real question is does anyone know how I can save empty date values using ADO back to an underlying Fox table...?

Many thanks in anticipation of any advice offered....

Nick Taylor
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform