Click here to Skip to main content
15,883,901 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,
I have made a database entering form by simple drag and drop.I am using VS2008. I get the error when I try to navigate through the form using navigation button.The error is as under,

Column 'ID' does not allow nulls.
A first chance exception of type System.Data.NoNullAllowedException occurred in System.Data.dll


Please suggest how can I handle this exception. Please guide me I am very worried. trying from last five hours. Please suggest How can I make my form directly interact with database without save button. real-time change in the data should apply on the data table.
Please solve my problem I am in a huge trouble.
Looking forward for the best of your response.
Regards
Posted
Updated 24-Oct-10 11:24am
v4
Comments
Henry Minute 24-Oct-10 17:14pm    
Please edit your question so that you can paste in the actual error. Copy it from the dialog and paste it in your question.
J imran 24-Oct-10 17:24pm    
ok I have updated my question. Thank you for replying me.
Best Regards

1 solution

The error suggests that you have created an ID column, made it non nullable and NOT set it as an Identity field. This is assuming you are using SQL Server.

Cahnge the ID column to be an identity column or supple the unique key from your client.
 
Share this answer
 
Comments
J imran 25-Oct-10 1:35am    
I am still facing the problem. crossed the deadline. please help me. I have set the column as id field. and it is not nullable. Null is not allowed. I don't want to change this constrain. I just want to prompt the user as he or she click the navigation that the id field was entered blank or it has not unique key. Hope you are getting me. I am frustrated of me. Please help me out for the sake of God.. he he.
Looking forward.
Mycroft Holmes 25-Oct-10 1:49am    
What database are you using

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900