Link to home
Start Free TrialLog in
Avatar of thorv71
thorv71Flag for Norway

asked on

Error when trying to add parameters til sql select dataset

I have in my select a parameter in the where clause, and try to add a value to that from a textbox, but keep getting an error. I'm i Newbe to :-)

This is the code:
Me.Ko_kontaktTableAdapter.Adapter.SelectCommand.Parameters.AddWithValue("@sok", TextBox_sok.Text)


This is the select:
SELECT     ko_nummer, ko_navn, ko_adresse, ko_postnr, ko_poststed, ko_epost, ko_dato, ko_dato_endret
FROM         ko_kontakt where ko_nummer = @sok

This is the error:
Argument not specified for parameter 'sok' of 'Public Overridable Overloads Function Fill(dataTable As kalkulasjonDataSet.ko_kontaktDataTable, sok As String) As Integer'.
Avatar of Nasir Razzaq
Nasir Razzaq
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of thorv71


Thanks CodeCruiser, works perfect :-)
Glad to help :-)