Results 1 to 3 of 3
  1. #1
    Join Date
    Jan 2003
    Posts
    52

    Thumbs down Unanswered: stupid INSERT INTO

    i m trying to insert data into a table and its not working

    Dim SQLstr As String

    SQLstr = ("Insert into kotri (date,upstream,downstream) values (#25 May 2000#,555,556);")
    CurrentDb.Execute SQLstr

    i have tried with little changes like putting date #25/2/2000#.

    but all the times it gives error Sysntax error in INSERT INTO statement

  2. #2
    Join Date
    Apr 2002
    Location
    Toronto, Canada
    Posts
    20,002
    date is a reserved word, put it into square brackets, or better yet, rename the column

    as for date formats, if possible, always specify ISO standard format, e.g. #2003-01-28#

    rudy
    http://r937.com/

  3. #3
    Join Date
    Jan 2003
    Posts
    52

    Thumbs up

    thanx it worked, and thanx for the tip

Posting Permissions

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