Article View: borland.public.cppbuilder.database.ado
Article #345Re: E_FAIL with NOT NULL datetime
From: Mark Guerrieri
Date: Fri, 18 Aug 2006 14:28
Date: Fri, 18 Aug 2006 14:28
41 lines
1983 bytes
1983 bytes
What is the back-end database? Some ODBC drivers (I believe MySQL is among them) have trouble with NULL date values. Mark "crhras" <crhras@sbcglobal.net> wrote in message news:44e52431$1@newsgroups.borland.com... > > Can someone please explain why the following occurs ? > > The first table gives E_FAIL whenever the table is opened and at least one > record is "000-00-00 00:00:00". The second table works just fine. The > second table is exactly the same as the first except DTime is declared as > NOT NULL. > > -- > -- broken table > -- > CREATE TABLE tt ( > serial int(10) unsigned NOT NULL auto_increment, > DTime datetime NOT NULL default '0000-00-00 00:00:00', > val int, > PRIMARY KEY (serial) > ) > ; > > -- > -- good table > -- > CREATE TABLE tt ( > serial int(10) unsigned NOT NULL auto_increment, > DTime datetime default '0000-00-00 00:00:00', > val int, > PRIMARY KEY (serial) > ) > ; > > Thank you, > Curt > >
Technical Details
Message-ID:
<44e5ce8e@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news2.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<44e52431$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 10698b,ab7fdf66c4df4ca4 X-Google-Attributes: gid10698b,public X-Google-Language: ENGLISH,ASCII-7-bit From: "Mark Guerrieri" <mguerrieri@no_spam_verizon.net> Newsgroups: borland.public.cppbuilder.database.ado References: <44e52431$1@newsgroups.borland.com> Subject: Re: E_FAIL with NOT NULL datetime Date: Fri, 18 Aug 2006 10:28:27 -0400 Lines: 43 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.2869 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2962 X-RFC2646: Format=Flowed; Response NNTP-Posting-Host: 71.245.210.202 Message-ID: <44e5ce8e@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1155911310 71.245.210.202 (18 Aug 2006 07:28:30 -0700) Path: arc1-ca.pugleaf.net!g2news2.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail