473,327 Members | 2,118 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,327 software developers and data experts.

Error Message about column not allowing nulls

2
I am writing a program using visual basic.NET 2003 to be used to update and store data in a database I have stored in Access 2003. I am using a OdbcDataAdapter to generate my dataset, then using a form as my data entry.

Every time I go to add a new record to my dataset to save to my Table, I receive this error message... 'An unhandled exception has occurred in your application ... Column "FP" does not allow nulls.'

Now FP is a column in my table where this information I am entering will be stored, however in access the columns properties are not required. The column is type Boolean. Essentially, the reason why is not required is bc it is a classification and there are 2 other choices to pick from all of which are not required either in my access table.

This happens every time I go to add a New Record then either when I tab all the way through to the end of my fields on my form or hit save.

The code I am using is:
' New Button
DataView1.AddNew()
DataGrid1.CurrentRowIndex =DataView1.Count

'Save
OdbcDataAdapter1.Update(DataSet11.tbl_field_report )

Now I am not even sure if that code is appropriate or functions since I cannot get past this error message. If anyone has any knowledge on this error it would be greatly appreciated.

Thanks so much.
Jul 31 '07 #1
0 1095

Sign in to post your reply or Sign up for a free account.

Similar topics

5
by: Aaron C | last post by:
Hi, I'm trying to do an insert with the following statement: INSERT INTO user VALUES ( 'ag@ag.com','ag','Aaron','Chandler','','','La Mirada','CA',90638,714,'',''); and I'm getting the error...
6
by: Shervin Shapourian | last post by:
Hi everybody, I need to trap error messages in my stored procedures and log them. I can use @@ERROR global variable to get the error code and look it up in sysmessages table to get the...
1
by: Lauren Quantrell | last post by:
I'm using Access as the front end to SQL2000. I have a table of contacts. UniqueID is the PK. There's also a column named "CreatedBy" int and a column Category smallint. They're all set to no...
1
by: Nachi | last post by:
I am getting above error, could pls anyone help me........? Soruce Code : Sub updateOfferCategoryAmounts(ByVal Transid As Long) Dim spComm As Command Set spComm = New Command Dim intCatID...
10
by: roy.anderson | last post by:
Error is thus: "Cast from type 'DBNull' to type 'String' is not valid." Simple, right? Well, no (or at least not for me). Here's a function, followed by the calling code below: Function...
3
by: teddysnips | last post by:
I need a trigger (well, I don't *need* one, but it would be optimal!) but I can't get it to work because it references ntext fields. Is there any alternative? I could write it in laborious code...
2
ak1dnar
by: ak1dnar | last post by:
Hi, I am getting some sql errors when trying to insert a record to mysql table using asp.net application. Let me explain the scenario for your reference. This asp.net web form is executing...
3
by: kbcompany | last post by:
Hi I have just started learning oracle. i have created a table with name imp_master and columns item_code with constraint not null, item_name with constraint n1 not null(n1 is user...
5
by: ph3ng | last post by:
Hi I was executing sp_help on a server (ran against master database) and i get the following message: Associated statement is not prepared(HY007) Anyone got any idea what is wrong?
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.