Results 1 to 2 of 2

Thread: date format to access database

  1. #1
    Join Date
    Dec 2004
    Posts
    152

    date format to access database

    Hi
    Im having difficulties with the date field writing to an access database.

    I am simply transfering one field from one table to another field in another table.
    Both fields are defined as date/time

    I am using INSERT

    INSERT into tablename (fielddate) VALUES (fielddate)
    this isnt working
    if i remove '' in INSERT I get the belwo error :
    Microsoft JET Database Engine error '80040e14'

    Syntax error in INSERT INTO statement.

    /webwork/StudentSpace/archiveM-action.asp, line 28

    if I put ' arrnd the value field date, like so,
    INSERT into tablename (fielddate) VALUES ('fielddate')

    I get the below error.
    Microsoft JET Database Engine error '80040e07'

    Data type mismatch in criteria expression.

    /webwork/StudentSpace/archiveM-action.asp, line 28

    Any ideas.
    cheers
    Steve

  2. #2
    Join Date
    Jan 2006
    Location
    Manchester England UK
    Posts
    225
    In access you should enclose your data in hashes like so

    INSERT INTO tbl_Sometable (myDate) VALUES (#12/25/2005#)

Similar Threads

  1. Help with variable Scopes in PHP and database access
    By LithMaster in forum Client & Server Side Scripting (PHP, ASP, JavaScript)
    Replies: 0
    Last Post: 23 Aug 2005, 03:29 PM

Posting Permissions

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