Results 1 to 2 of 2
  1. #1
    Join Date
    Dec 2003

    Exclamation Unanswered: SQL datetime format problem

    i'm useing SQL Server 2000, but when i execute the Sql
    from the ASP, the error msg was shown,

    The ASP Error page

    Microsoft OLE DB Provider for ODBC Drivers (0x80040E07)
    [Microsoft][ODBC SQL Server Driver][SQL Server]The
    conversion of char data type to smalldatetime data type
    resulted in an out-of-range smalldatetime value.

    but i run is WIN200, there is no problem, now, i run in XP
    (HOME)and XP(Pro) there has problem
    there is the code of the ASP

    StartDate = CDate(request.form("yyyy") & "/" &
    request.from ("mm") & "/" & request.form("dd"))

    EndDate = DateAdd("d", request.form("Days"), StartDate)

    "Select a, b, c from tableA where the Date between '" &
    startDate & "' and '" & EndDAte & "'"

    i try to set the DATE fromat in the Control Panel, and i
    try to install the MDAC 2.7 for the WEB Server, and my XP
    (Home), the result is the same, but i run the SQL in the
    SQL Server is no problem
    what can i need to do ? is that the SQL Server problem or
    ODBC Problem or IIS problem ....?

  2. #2
    Join Date
    Jun 2003
    Provided Answers: 1
    I think you have a typo, but I don't know if that is what caused the problem:

    "StartDate = CDate(request.form("yyyy") & "/" &
    request.from ("mm") & "/" & request.form("dd"))"

    request.from? I assume that should be request.form?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts