www.webdeveloper.com
Results 1 to 5 of 5

Thread: Date/Time - Microsoft OLE DB Provider for ODBC Drivers error '80040e07'

  1. #1
    Join Date
    Jul 2007
    Posts
    461

    Date/Time - Microsoft OLE DB Provider for ODBC Drivers error '80040e07'

    Hi I am getting this error:

    Microsoft OLE DB Provider for ODBC Drivers error '80040e07'

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

    This is my SQL statement (goDate is in 2/15/2009 format. I'm thinking that might be my problem?.. It IS a date/time field in Access).

    SQL = "insert into calendar (event, cal_date, username) values " & _
    "('" & new_event & "','" & goDate & "','" & my_usernm & "');"


    Thank you

  2. #2
    Join Date
    Aug 2005
    Location
    The Garden State
    Posts
    5,634
    it is. you have to use something to convert the string (since SQL is a string when you build this variable it becomes a string) to a date. Try using CDate.
    Acceptable Use | SQL Forum FAQ | celery is tasteless | twitter

    celery is tasteless - currently needing some UI time

  3. #3
    Join Date
    Nov 2002
    Location
    Baltimore, Maryland
    Posts
    12,270
    Give #2/15/2009# a try.
    “The power of the Web is in its universality. Access by everyone regardless of disability is an essential aspect.”
    —Tim Berners-Lee, W3C Director and inventor of the World Wide Web

  4. #4
    Join Date
    Jul 2007
    Posts
    461
    Hi, #2/15/2009# worked. Thank you!

  5. #5
    Join Date
    Mar 2011
    Posts
    1
    it may be difference in the date option, for Eg: You have created a database in UK server and if you copy the database in you local and try to update this thing it wont work because UK/US date format is totally different when compared to Indian date format
    For India 25/12/2011
    For UK it 12/25/2011
    so when you are updating in the database it wont accept you have change the format.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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



Recent Articles