Re: Clearing DATE type field through ODBC
Posted in 1998
In article <34B11BE9.2B1EB30A@erols.com>, "Jay D. Sullivan" <jnelaine@erols.com> writes >Hello, > >We have a VB3 application which is running against an Informix database and >I'm having trouble clearing date fields which are bound to text boxes. >When I clear the date field on the VB form, ODBC seems to be sending back >1900-01-01 instead of null. I have traced through the application and I am >certain that the bound field is empty just before the update. > Empty = "" NULL = null. It looks like the field either has not been initialised or it is "" You have to explictly set it to NULL. >My ODBC driver is Informix-CLI 2.5 (32-bit) version 2.12.0000. I am going >against an Informix Online Workgroup Server version 7.22 but a client of >ours has experienced the same problem against an Online Dynamic Server >(with the same ODBC driver). > >The data type of the field is DATE (not DATETIME) and it is defined as >nullable. > >When I use other applications such as Microsoft Access or Microsoft Query, >I seem to be able to clear the field. > >Any ideas would be appreciated. > >Jay Sullivan >Economic Analysis Group, Ltd. >jsullivan@eagltd.com > > -- David Williams Maintainer of the Informix FAQ Primary site (Beta Version) http://www.smooth1.demon.co.uk Official site http://www.iiug.org/techinfo/faq/faq_top.html I see you standin', Standin' on your own, It's such a lonely place for you, For you to be If you need a shoulder, Or if you need a friend, I'll be here standing, Until the bitter end... So don't chastise me Or think I, I mean you harm... All I ever wanted Was for you To know that I care