troubleshooting Question

Error when trying to add parameters til sql select dataset

Avatar of thorv71
thorv71Flag for Norway asked on
Microsoft Applications.NET ProgrammingVisual Basic.NET
3 Comments1 Solution684 ViewsLast Modified:
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'.
Join our community to see this answer!
Unlock 1 Answer and 3 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 3 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros