No value given for 1 or more required parameters.

I keep getting an error about No value given and then the the code stops.

When i run the response.write code below the vaule is bing pulled from the form but it doenst seem like something in my Select statement is working write. Could it be my Query strings?

Thanks for the help again!


 Sub DayWeekView(ByVal s As Object, ByVal e As EventArgs)
        Dim varQueryString As String = ReservationViews.SelectedItem.Value
        'Response.Write(ReservationViews.SelectedItem.Value)
        'Response.End()
        Dim Query As String
       
        Select Case varQueryString
           
            Case "1"
               
                Query = "SELECT tbl_Reservations.Reservation_ID, tbl_Customers.FName, tbl_Customers.LName, tbl_Reservations.ReservationDate, tbl_Reservations.RentalPeriodHrs, tbl_Fleet.Fleet, tbl_Reservations.Paid " & _
                " FROM tbl_ReturnInfo INNER JOIN (tbl_Fleet INNER JOIN (tbl_Pickup INNER JOIN (tbl_Customers INNER JOIN tbl_Reservations ON tbl_Customers.Customer_ID = tbl_Reservations.Customer_ID) ON tbl_Pickup.Pickup_ID = tbl_Reservations.Pickup_ID) ON tbl_Fleet.Fleet_ID = tbl_Reservations.Fleet_ID) ON tbl_ReturnInfo.Return_ID = tbl_Reservations.Return_ID" & _
                " WHERE (((tbl_Reservations.ReservationDate)=DateAdd(" & "d" & ",1,Date())))"
                Response.Write(Query)
                Response.End()
            Case "2"
               
                Query = "SELECT tbl_Reservations.Reservation_ID, tbl_Customers.FName, tbl_Customers.LName, tbl_Reservations.ReservationDate, tbl_Reservations.RentalPeriodHrs, tbl_Fleet.Fleet, tbl_Reservations.Paid" & _
                " FROM tbl_ReturnInfo INNER JOIN (tbl_Fleet INNER JOIN (tbl_Pickup INNER JOIN (tbl_Customers INNER JOIN tbl_Reservations ON tbl_Customers.Customer_ID = tbl_Reservations.Customer_ID) ON tbl_Pickup.Pickup_ID = tbl_Reservations.Pickup_ID) ON tbl_Fleet.Fleet_ID = tbl_Reservations.Fleet_ID) ON tbl_ReturnInfo.Return_ID = tbl_Reservations.Return_ID" & _
                " WHERE (((tbl_Reservations.ReservationDate)=DateAdd(" & "w" & ",1,Date())))"

            Case Else
                Query = "SELECT tbl_Reservations.Reservation_ID, tbl_Customers.FName, tbl_Customers.LName, tbl_Reservations.ReservationDate, tbl_Reservations.RentalPeriodHrs, tbl_Fleet.Fleet, tbl_Reservations.Paid" & _
                " FROM tbl_ReturnInfo INNER JOIN (tbl_Fleet INNER JOIN (tbl_Pickup INNER JOIN (tbl_Customers INNER JOIN tbl_Reservations ON tbl_Customers.Customer_ID=tbl_Reservations.Customer_ID) ON tbl_Pickup.Pickup_ID=tbl_Reservations.Pickup_ID) ON tbl_Fleet.Fleet_ID=tbl_Reservations.Fleet_ID) ON tbl_ReturnInfo.Return_ID=tbl_Reservations.Return_ID"

        End Select
       
       
       
        objCmd = New OleDbCommand(Query, objCon)
        objCon.Open()

        objRdr = objCmd.ExecuteReader()
        dgReservations.DataSource = objRdr
        dgReservations.DataBind()

        objRdr.Close()
        objCon.Close()
    End Sub
Rafiq24Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Rafiq24Author Commented:
Here is my code within the HTML tags.

<table  border="1" bordercolor="#394599">
                    <tr>
                    <td>
                    <asp:RadioButtonList Autopostback="true" id="ReservationViews"  OnSelectedIndexChanged="DayWeekView" TextAlign="Right" runat="server">
                    <asp:ListItem  Text="Today's Reservations" Value="1"></asp:ListItem>
                    <asp:ListItem Text="This Week's Reservations" Value="2"></asp:ListItem>
                    <asp:ListItem Selected="True" Text="All Reservations" Value="3"></asp:ListItem>
                   </asp:RadioButtonList>
                   </td>
                   </tr>
                    </table>
nayernaguibCommented:
I think you need to enclose the interval of the DateAdd function within single quotes.

Example:

  DateAdd('w',1,Date())

_______________

  Nayer Naguib

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Rafiq24Author Commented:
Thanks Nayer! That was it. You just made yourself $400 dollars! (or points)
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Programming

From novice to tech pro — start learning today.