error using tableadapter

was looking for a little help on this one i'm doing the tutorial for 05
http://beta.asp.net/guidedtour2/
and i'm on page 14 adding update functionality, the code provided is generating an overload error for the way in which the .Update is being used. Here is the error I'm getting.
Error 1 d:\Authors\App_Code\DataAccess.vb(23): error BC30516: Overload resolution failed because no accessible 'Update' accepts this number of arguments. /

Has anyone else come accross this or is there a correction out there somewhere that i'm missing?

[565 byte] By [BradBall] at [2007-12-17]
# 1
Hi,
Could you please post a snippet of the code that generates the error?
Coz normally, this kind of error occurs when no overlaoded functions accepts the number of arguments that you are passing...

cheers,
Paul June A. Domag

PaulDomag at 2007-9-9 > top of Msdn Tech,.NET Development,.NET Framework Data Access and Storage...
# 2
This is the code from my project it is just slightly different from what is in the tutorial
Public Sub UpdateAuthor(ByVal au_lname As String, ByVal au_fname As String, ByVal phone As_
String, ByVal address As String, ByVal city As String, ByVal state As String, ByVal zip As String,_ ByVal contract As Boolean, ByVal Original_au_id As String)
Dim authorsTableAdapter As New AuthorsDataSetTableAdapters.authorsTableAdapter
authorsTableAdapter.Update(au_lname, au_fname, phone, address, city, state, zip, contract,_ Original_au_id)

End Sub

Here is the code from the tutorial.
Public Sub UpdateAuthor(ByVal au_lname As String, ByVal au_fname As String, _
ByVal phone As String, ByVal address As String, ByVal city As String, ByVal state As String, _
ByVal zip As String, ByVal contract As Boolean, ByVal Original_au_id As String)

Dim authorsTableAdapter As New AuthorsDataSetTableAdapters.authorsTableAdapter
authorsTableAdapter.Update(Original_au_id, au_lname, au_fname, phone, address, city, state, _
zip, contract, Original_au_id)
End Sub

The only differene is I changed
authorsTableAdapter.Update(Original_au_id, au_lname, au_fname, phone, address, city, state, _
zip, contract, Original_au_id)

To:
authorsTableAdapter.Update(au_lname, au_fname, phone, address, city, state, _
zip, contract, Original_au_id)

However I tried the code both ways in the editor, and it was an overload option. Should I be constructing another datatable or dataset to pass these update results through?

BradBall at 2007-9-9 > top of Msdn Tech,.NET Development,.NET Framework Data Access and Storage...
# 3
If your method looks like this...

authorsTableAdapter.Update(au_lname, au_fname, phone, address, city, state, zip, contract,_ Original_au_id)

...then make sure you have the following columns in your GridView marked as ReadOnly=false...

au_lname
au_fname
phone
address
city
state
zip
contract

...and DataKeyNames set to "au_id" and the au_id column set to ReadOnly=true.
That should ensure the correct values are being passed to the tableAdapter. To help debug this, you can alway enumerate the parameters in the Updating event of the data source or gridview to see what is actually being passed. See the Data Parameters example at http://beta.asp.net/QUICKSTART/aspnet/doc/data/advanced.aspx#parameters

Hope this helps,
Bradley Millington
Web Platform and Tools Team, Microsoft

Bradley at 2007-9-9 > top of Msdn Tech,.NET Development,.NET Framework Data Access and Storage...
# 4
Hi Brad,
Just wanted to know if you have resolved this problem. I am getting the same error, but haven't found any answers to my issue.

Regards,
Sohail

skhan22 at 2007-9-9 > top of Msdn Tech,.NET Development,.NET Framework Data Access and Storage...
# 5

I as well am getting this error. Here is the code and data table

Public Class DataAccess

Public Function GetTrailers(ByVal Trailer As String) As TrailersDataSet

Dim trailersTableAdapter As New TrailersDataSetTableAdapters.TrailersTableAdapter

Dim trailersData As New TrailersDataSet()

trailersTableAdapter.Fill(trailersData.Trailers)

Return trailersData

End Function

Public Sub UpdateTrailers(ByVal Location As String, ByVal Status As String, ByVal Comments As String, ByVal Notes As String, ByVal Lane As String, ByVal vendor As String)

Dim trailersDataTableAdapter As New TrailersDataSetTableAdapters.TrailersTableAdapter

trailersDataTableAdapter.Update(Location, Status, Comments, Notes, Lane, vendor)

End Sub

End Class
Here is a table layout with data as well l
Trailer
Location
Status
Comments
TrailerType
Notes
Lane
Vendor
352016
Manjinder
7:00p/u-del.10:00
Supervan M/L
T54A/B
Arvin
352017
Surrinder
13:00 p/u
Supervan M/L
T54A/B
Arvin
352018
Navtej
7:50 p/u 9:50 del
Supervan M/L
T54A/B
Arvin
352019
TST
DEL TBA
Supervan M/L
T54A/B
Arvin
352020
Sidhu
5:00 p/u 7:00 del
Supervan M/L
T54A/B
Arvin
352021
Manjit
15:00 p/u-del.18:00
Supervan M/L
T54A/B
Arvin
Status: Ok
Visible on the page: 1 - 6
Total visible: 6
Total rows: 6
Any help would be appreciated

AndrewRae at 2007-9-9 > top of Msdn Tech,.NET Development,.NET Framework Data Access and Storage...

.NET Development

Site Classified