•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the VB.NET section within the Software Development category of DaniWeb, a massive community of 456,195 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,943 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our VB.NET advertiser: Programming Forums
Views: 2648 | Replies: 1
![]() |
•
•
Join Date: Oct 2006
Posts: 14
Reputation:
Rep Power: 3
Solved Threads: 0
Hi there,
I have a form that adds a Customer to a database. I had set the cust_id in the Ms Access as an Autonumber. and when I open the vb form, i wrote a code that will set the textbox of the cust_id as the count of the records + 1. That is displayed correctly.
my problem is this. When I click on the button save i have the following code attached
it's telling me that since the cust_id is a primary number, it's doesn't allow it to be null. Now i'm generating that number as i specified in the first paragraph.
any help?
Thanks
Luke
I have a form that adds a Customer to a database. I had set the cust_id in the Ms Access as an Autonumber. and when I open the vb form, i wrote a code that will set the textbox of the cust_id as the count of the records + 1. That is displayed correctly.
my problem is this. When I click on the button save i have the following code attached
me.databinding(dataset11, "Customer").addnew() oledb_Cust.fill(dataset11)
it's telling me that since the cust_id is a primary number, it's doesn't allow it to be null. Now i'm generating that number as i specified in the first paragraph.
any help?
Thanks
Luke
•
•
Join Date: May 2007
Posts: 35
Reputation:
Rep Power: 2
Solved Threads: 1
As I understand it ur not supposed to be inserting anything in the auto number field, Access should take care of that automaticaly.
My current Project www.footystat.com
![]() |
•
•
•
•
•
•
•
•
DaniWeb VB.NET Marketplace
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
- vb express database autonumber problem. (VB.NET)
- Search code in a database (Visual Basic 4 / 5 / 6)
- Updating an Access database with a secondary form (VB.NET)
- updating a database (ASP.NET)
- Criminal Record Database (Computer Science and Software Design)
- vb6 update record in the database (Visual Basic 4 / 5 / 6)
- link record in database with contactItem? (Visual Basic 4 / 5 / 6)
- how willl i be able to save a specific record into my database file in ms access (Java)
- Writing to an Access Database using Java... (Java)
Other Threads in the VB.NET Forum
- Previous Thread: combobox control
- Next Thread: if statement problem with radiobuttons


Linear Mode