Wrox Programmer Forums
|
VB.NET 2002/2003 Basics For coders who are new to Visual Basic, working in .NET versions 2002 or 2003 (1.0 and 1.1).
Welcome to the p2p.wrox.com Forums.

You are currently viewing the VB.NET 2002/2003 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 October 13th, 2003, 01:09 PM
Registered User
 
Join Date: Oct 2003
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default ??? about error message

I am having a small problem I am trying to add data to my database on my local SQL Server. I inserted this Try...Catch... Statement in my code to find the problem.


Code:
Code'Execute the SqlCommand object to insert the new data... 
        Try 
            objCommand.ExecuteNonQuery() 
        Catch ex As Exception 
            MessageBox.Show(Err.Description) 
        End Try

System.Data.SqlClient.SqlException: Invalid Column Name 'AIncome'......
That is how the column is labeled in the Sql Database.

Code:
'set the SqlCommand object properties... 
        objCommand.Connection = SqlConnection1 
        objCommand.CommandText = "INSERT INTO Demo " & _ 
        "(Address, AIncome, CNumber, ECost, FName, ID, LName, Status)" & _ 
            "VALUES (@Address, @AIncome, @CNumber, @ECost, @FName, @ID, @LName, @Status);":





Similar Threads
Thread Thread Starter Forum Replies Last Post
What is the error message for a 500 server error? chobo2 C# 2005 1 May 4th, 2008 03:11 AM
Where does the error message go? Wei Wang BOOK: Beginning PHP5, Apache, and MySQL Web Development ISBN: 978-0-7645-7966-0 1 March 13th, 2006 02:03 PM
Error Message alannoble26 Excel VBA 4 November 25th, 2005 11:20 AM
error message. Tasha Access VBA 2 August 11th, 2004 11:07 PM
Help with Error message mariakovacs Classic ASP Databases 3 October 10th, 2003 03:59 PM





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