CodeCharge Studio
search Register Login  

Visual PHP Web Development

Visually Create Internationalized Web Applications, Web Reports, Calendars, and more.
CodeCharge.com

YesSoftware Forums -> Archive -> GotoCode Archive

 Index or primary key cannot contain a Null value.

Print topic Send  topic

Author Message
aquatera
Posted: 06/14/2002, 10:26 AM

Need help with changing record in CCS table.

I keep getting the below error when inserting record in a new table(categories) I created in the BugTrack database. Any ideas?

Source: Record categories / Insert Operation
Command Text: INSERT INTO [categories]([category_name]) VALUES ('test4')
Error description: Index or primary key cannot contain a Null value. (Microsoft JET Database Engine)
INSERT INTO [categories]([category_name]) VALUES ('test4')
George L.
Posted: 06/14/2002, 10:44 AM

You are only inserting one value, when you have two. Primary Keys must be filled-in with some value.

If you dont have a record column for catagories on your page, then try using autoincrementing on your catagories field. This of course, if your catagores filed is a number or integer field.
This will implicitly insert a number into your catagories primary key on each insert.
aquatera
Posted: 06/14/2002, 1:13 PM

I'll will give that a try and let you know. Thanks for the quick response!

   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

Web Database

Join thousands of Web developers who build Web applications with minimal coding.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.