Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Visual Basic > VB 6 Visual Basic 6 > VB Databases Basics
|
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 software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old December 28th, 2004, 06:54 PM
Registered User
 
Join Date: Dec 2004
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Database Insert/Update problem with VB.NET form

Hello

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


Tino



zipped up project
www.itsthere2share.com/Amen2.zip

 
Old January 7th, 2005, 04:41 AM
Registered User
 
Join Date: Dec 2004
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi,

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

Finn

 
Old February 4th, 2005, 05:12 AM
Registered User
 
Join Date: Feb 2005
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to djgoran
Default

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

GORAN






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





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