0

Hi i got this problem and i dont why it occured
in my query i know that the Table name is correct and the Column Name is correct but
this error always appear

No value given for one or more required parameters.
the it highlights the da.fill(dt)

Dim da As New OleDbDataAdapter("Select * from Government_BAU where Months like January", con)
        da.Fill(dt)
1
Contributor
1
Reply
7
Views
3 Years
Discussion Span
Last Post by ImZick
0

Nvm i got the answer :)

        Dim cmd As New OleDbCommand
        cmd.Connection = con
        cmd.CommandType = CommandType.Text
        cmd.CommandText = "Select * from Government_BAU where [" & .Combo_Deals_Filter.Text & "] like ? + '%'"

        cmd.Parameters.Add("@Value", OleDbType.VarChar).Value = .Text_Deals_Search.Text

        Dim da As New OleDbDataAdapter(cmd)
        da.Fill(dt)
This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.