thorv71
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 vb.net :-)
This is the code:
Me.Ko_kontaktTableAdapter. Adapter.Se lectComman d.Paramete rs.AddWith Value("@so k", TextBox_sok.Text)
Me.Ko_kontaktTableAdapter. Fill(Me.ka lkulasjonD ataSet.ko_ kontakt)
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_kont aktDataTab le, sok As String) As Integer'.
This is the code:
Me.Ko_kontaktTableAdapter.
Me.Ko_kontaktTableAdapter.
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_kont
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Glad to help :-)
ASKER