locked
Syntax Issue with Access Query in ASP.NET/VB.NET RRS feed

  • Question

  • User-266149547 posted

    I am having trouble with the following query in vb.net page behind to an asp.net application.  The query works fine until I add my "where" clause.  Can someone take a quick look at this query near the "where" clause to see if there is anything that stands out as wrong syntax?  My error says I am missing one of the required parameters.

            Dim sqlString As String = "SELECT Events.EventId, Events.Location, Events.EventName As EventName, "
            sqlString += "Events.EventDescription As Description, Format([Events.StartDate],""mm-dd-yyyy"") As StartDate, "
            sqlString += "Format([Events.EndDate],""mm-dd-yyyy"") As EndDate, Format([Events.StartTime],""hh:mm"") As TimeS, "
            sqlString += "Format([Events.EndTime],""hh:mm"") As TimeE,  [Class Type].ClassType As ClassType, Events.Status As Status, Events.Location As Location "
            sqlString += "FROM [Class Type] INNER JOIN Events ON [Class Type].ClassTypeID = Events.EventTypeID WHERE Events.Status = Cancelled"

    Tuesday, April 28, 2009 10:56 AM

Answers

  • User-266149547 posted

    Solved my own problem.

    WHERE ([Events.Status] = ('Cancelled'))"

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, April 28, 2009 11:20 AM