NOT NULL does not mean you can not leave the field empty.
It means the field can not contain the value NULL
All the empty fields get the default values you declared.
If you did not declare a default value, standard default values
for each data type are used.

Steve Holt wrote:

I am linking an MS Access front end to MYSQL on the back with ODBC
If I open the table I can enter a value in the course name field only which is the primary key
and it will save the record even though I have not entered values in the fields set up as NOT NULL
I have an ODBC trace file but it seems quite large to post to the list



At 11:17 AM 03/12/2003 -0600, gerald_clark wrote:


You have to show us.

Steve Holt wrote:

I am sure I am missing something very simple but I cant see it
I am using MS Access 97 as a front end to MYSQL
I have a table with the following desc

CREATE TABLE `tblcoursesoffered` (
  `DateCourseCreated` datetime default NULL,
  `Specialty` int(25) NOT NULL default '0',
  `CourseNo` float NOT NULL default '0',
  `CourseName` char(10) NOT NULL default '',
  `CourseDesc` char(255) default NULL,
  `ExamType` char(30) default NULL,
  `BeginDate` datetime NOT NULL default '0000-00-00 00:00:00',
  `EndDate` datetime NOT NULL default '0000-00-00 00:00:00',
  `ActualCity` char(30) NOT NULL default '',
  `ActualState` char(2) NOT NULL default '',
  `CourseStatus` char(15) default NULL,
  `CourseCoordinator` float default NULL,
  `ProjAttendance` float default NULL,
  `CMEHrsCourse` float default NULL,
  `CMEHrsAdditional` float default NULL,
  `CMEFee` double default NULL,
  `CAT1` tinyint(1) default NULL,
  `SponsorID` char(6) default NULL,
  `SponsorContact` char(50) default NULL,
  `SponsorContactPhone` char(13) default NULL,
  `SponsorContactFax` char(13) default NULL,
  `CourseHotel` int(11) default NULL,
  `FacSleepingRoomsQty` float default NULL,
  `StaffSleepingRoomsQty` float default NULL,
  `fldCourseHotel` int(11) default NULL,
  `fldTransportationInfo` char(255) default NULL,
  `fldTimestamp` timestamp(14) NOT NULL,
  PRIMARY KEY  (`CourseName`),
  KEY `Specialty` (`Specialty`),
  KEY `BeginDate` (`BeginDate`)
) TYPE=MyISAM ROW_FORMAT=FIXED;

Even with this description MYSQL allows me to create a new record with null values in the fields
listed as not null
is there another setting somewhere I am missing??


Thanks
Steve Holt


--------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php






---------------------------------------------------------------------
Before posting, please check:
  http://www.mysql.com/manual.php   (the manual)
  http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php






--------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php



Reply via email to