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

error using tableadapter
Ernie Booth
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.
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
mowali75
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
Pavr
I as well am getting this error. Here is the code and data table
Class DataAccess Public Function GetTrailers(ByVal Trailer As String) As TrailersDataSet Dim trailersTableAdapter As New TrailersDataSetTableAdapters.TrailersTableAdapter Dim trailersData As New TrailersDataSet()Public
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.TrailersTableAdaptertrailersDataTableAdapter.Update(Location, Status, Comments, Notes, Lane, vendor)
End SubEnd
ClassHere is a table layout with data as well l
dninja
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
Bibek
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