Wrox Programmer Forums
|
ASP.NET 4 General Discussion For ASP.NET 4 discussions not relating to a specific Wrox book
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 4 General Discussion 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 March 24th, 2012, 03:36 PM
Registered User
 
Join Date: Mar 2012
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default adding new data to a table

I am trying to insert a new supplier to my database but I am getting an error on textbox 11. What might be the problem? Is it anything to do with properties of text box 11? Here is the code
Red text is where the problem is.
Protected Sub Button1_Click(sender As Object, e As System.EventArgs) Handles Button1.Click
Dim insertNewSupplier As New SupplierTableAdapters.SuppliersTableAdapter
insertNewSupplier.InsertSupplier(Me.TextBox1.Text, Me.TextBox2.Text, Me.TextBox3.Text, Me.TextBox4.Text, Me.TextBox5.Text,
Me.TextBox6.Text, Me.TextBox7.Text, Me.TextBox8.Text, Me.TextBox9.Text, Me.TextBox10.Text,Me.TextBox11.Text)

error message is
Compiler Error Message: BC30057: Too many arguments to 'Public Overridable Function InsertSupplier(Company_Name As String, Contact_Name As String, Title As String, Address As String, City As String, Region As String, Post_Code As String, Phone As String, Fax As String, Country As String) As Integer'.



Line 7: Dim insertNewSupplier As New SupplierTableAdapters.SuppliersTableAdapter
Line 8: insertNewSupplier.InsertSupplier(Me.TextBox1.Text, Me.TextBox2.Text, Me.TextBox3.Text, Me.TextBox4.Text, Me.TextBox5.Text,
Line 9: Me.TextBox6.Text, Me.TextBox7.Text, Me.TextBox8.Text, Me.TextBox9.Text, Me.TextBox10.Text,Me.TextBox11.Text)
 
Old March 24th, 2012, 08:52 PM
Authorized User
 
Join Date: Dec 2011
Posts: 39
Thanks: 9
Thanked 0 Times in 0 Posts
Default

It looks like the function only takes 10 arguments but you are passing in 11.





Similar Threads
Thread Thread Starter Forum Replies Last Post
adding functionality to a table aceconcepts PHP How-To 0 February 16th, 2006 08:59 AM
Help adding a row to a data table. jbenson001 VB.NET 2002/2003 Basics 3 March 30th, 2005 02:12 PM
Adding new table on page dungey Javascript 2 February 20th, 2004 07:11 AM





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