Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Visual Basic > VB 6 Visual Basic 6 > VB Databases Basics
Password Reminder
| FAQ | Members List | Search | Today's Posts | Mark Forums Read
VB Databases Basics Beginning-level VB coding questions specific to using VB with databases. Issues not specific to database use will be redirected to other forums.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the VB Databases Basics section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old December 28th, 2004, 06:54 PM
Registered User
Join Date: Dec 2004
Location: , , .
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Database Insert/Update problem with VB.NET form


I suspect that this is a simple error on my part but this example may help others starting out with ADO.NET.

I'm working on a very basic Database Application. I've included the full project as an attachment in this post.

Its a very basic Form that is the front end for a database containing contact information.

The form has many fields but I've only implemented the first 4 for simplicity.

The form has 4 buttons

1-Find = user enters record ID to bring up the contact information for that record (SQL Select used)
2-New = user can create a new record (SQL Insert used)
3-Save = user saves current record (updated or new- SQL Update or insert used)
4-Delete = Record deleted

I have used an access DB for simplicity but will need to use MySql or MS SQL for end project. Amen.mdb is included with project.

Parts That Work

1-Find Works OK
2-New Works OK until Save

Parts that Don't work

3 - Save - Insert only inserts the first 2 fields in the database! ie name & contact, phone & mobile don't get inserted! -
     I don't understand this as the code seems OK
     Update doesn't work at all - it causes an unhandled exception in the cmdUpdate part of my code.

The project was written in VS.NET 2003

Any Help greatly appreciated


zipped up project

Reply With Quote
  #2 (permalink)  
Old January 7th, 2005, 04:41 AM
Registered User
Join Date: Dec 2004
Location: , , .
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts


Zip-filen cannot be opened, by me at least. My zip-program says its corrupted.


Reply With Quote
  #3 (permalink)  
Old February 4th, 2005, 05:12 AM
Registered User
Join Date: Feb 2005
Location: Niagara Falls, Ontario, Canada.
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to djgoran

IF you can post your update and save code I can look at it and tell you if there is anyting wrong with it.


Reply With Quote

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem VB.NET 2005 - update data in Ms Access Netuser Pro Visual Basic 2005 0 August 1st, 2008 01:34 PM
VB.Net Database linkup problem Matty10209 Visual Basic 2005 Basics 2 January 6th, 2008 01:45 PM
Insert/Update problem soheil BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 5 November 15th, 2007 11:18 AM
update/insert work in queries but not on form jonicholson Access VBA 3 January 18th, 2005 06:05 PM

All times are GMT -4. The time now is 06:27 AM.

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.