Article View: borland.public.jbuilder.database
Article #312Re: default values problem with mysql version 5
From: Anton Jungreuthmayer
Date: Fri, 17 Aug 2007 15:51
Date: Fri, 17 Aug 2007 15:51
32 lines
2130 bytes
2130 bytes
Paul Nichols [TeamB] wrote: > Anton Jungreuthmayer wrote: >> I have an application written in java with jBuilder. >> >> This uses JDBC to access a mySQL database which I am converting from >> version 4.1 to version 5.0 >> >> When my application tries to INSERT a record but does not specify a >> value for a text field that is defined as NOT NULL with no default set >> the following error message is returned : >> >> Field 'somedata' doesn't have a default value >> >> this doesn't happen with JDBC on mysql 4.1 >> It also doesn't happen when I run the command in mysql, or when using >> mySql query browser but only when I connect using JDBC >> >> Any clues ? >> >> Anton > > This is probably a result of the changes to mySQL 5 and the JDBC > Drivers. Which MySQL JDBC driver (5.1 is the latest) are you using and > which JDK version? > > This is not going to be related to JB, unless you are using the > QueryDataSet, which may or may not work correctly with newer JDBC > implementations. > JDBC driver - 5.0.6 java version 1.5.0_04-b05
Technical Details
Message-ID:
<46c5c3ec$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news2.google.com!news3.google.com!feeder1-2.proxad.net!proxad.net!feeder1-1.proxad.net!club-internet.fr!feedme-small.clubint.net!newsfeed.freenet.de!newspeer1.nwr.nac.net!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mailReferences:
<46c5bbd4@newsgroups.borland.com> <46c5c2b8@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 1073da,46beccc389838db9 X-Google-Attributes: gid1073da,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Date: Fri, 17 Aug 2007 16:51:07 +0100 From: Anton Jungreuthmayer <anton@junglemajor.co.uk> User-Agent: Thunderbird 2.0.0.6 (Windows/20070728) MIME-Version: 1.0 Newsgroups: borland.public.jbuilder.database Subject: Re: default values problem with mysql version 5 References: <46c5bbd4@newsgroups.borland.com> <46c5c2b8@newsgroups.borland.com> In-Reply-To: <46c5c2b8@newsgroups.borland.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit NNTP-Posting-Host: 84.43.51.59 Message-ID: <46c5c3ec$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1187365868 84.43.51.59 (17 Aug 2007 08:51:08 -0700) Lines: 32 Path: arc1-ca.pugleaf.net!g2news2.google.com!news3.google.com!feeder1-2.proxad.net!proxad.net!feeder1-1.proxad.net!club-internet.fr!feedme-small.clubint.net!newsfeed.freenet.de!newspeer1.nwr.nac.net!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail