error when submit new DATE records

Ask a Question related to ASP Database, Design and Development.

  1. #1

    Default error when submit new DATE records

    I have to insert new records by a add_form.asp. the
    database is access. When I submit a record,
    if the DATE textbox is empty, I have an error because it
    appear access doesn't want empty record in date field!!
    I said "yes" to allow null in table properties
    Can someone help me?
    this is the error:

    [ODBC Microsoft Access Driver] Data type mismatch in
    criteria expression.

    thanks,

    Barb
    Barbaraa Guest

  2. Similar Questions and Discussions

    1. display records >(higher) than todays date?
      hi, I have a vacancies table which displays vancanies added into a database. I want to display the records that have todays date or higher in the...
    2. Filter records by date and time
      any chance to help me on this pls .. can anyone tell me how i can sort my table by date and time i wanna put down specific DATE and TIME into my db...
    3. ASP/SQL How to Query always the 2nd & 3rd records sortedby date
      Hello I have a news page and it is dynamic: The first headline has an image and a short description and is always the latest story because its...
    4. How Do I update Multiple Records with One Submit??
      Does anyone have a SOLID example of how this works? I've been struggling with this concept all day and am not understanding why it won't work. I...
    5. Update Multiple Records with One submit
      SQL 6.5 Database I have a list of registrants and I want to use a check box after each record to show those who attend and then post all with...
  3. #2

    Default Re: error when submit new DATE records

    Null and "" and "##" are not the same thing!

    Maybe you should say this:

    if request.form("dateTextBox") = "" then
    dt = "NULL"
    else
    dt = "#" & request.form("dateTextBox") & "#"
    end if
    sql = "UPDATE table SET dtColumn = " & dt & " WHERE ... "



    "Barbaraa" <anonymous@discussions.microsoft.com> wrote in message
    news:0ab601c39cad$b2348ed0$a501280a@phx.gbl...
    > I have to insert new records by a add_form.asp. the
    > database is access. When I submit a record,
    > if the DATE textbox is empty, I have an error because it
    > appear access doesn't want empty record in date field!!
    > I said "yes" to allow null in table properties
    > Can someone help me?
    > this is the error:
    >
    > [ODBC Microsoft Access Driver] Data type mismatch in
    > criteria expression.
    >
    > thanks,
    >
    > Barb

    Aaron Bertrand - MVP Guest

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139