[AccessD] HELP - Date in SQL string

Software Design & Solutions Pty Ltd. SDSSoftware at Optusnet.com.au
Tue Apr 8 22:44:57 CDT 2003


....that's it. Much appreciated.

Kath
  ----- Original Message ----- 
  From: Chris Mackin 
  To: accessd at databaseadvisors.com 
  Sent: Wednesday, April 09, 2003 1:35 PM
  Subject: RE: [AccessD] HELP - Date in SQL string


  Try renaming the [Date] field to anything that's NOT a reserve keyword.  A
  field name should never be one of the Access reserved keywords
  (here's a list:
  http://support.microsoft.com/default.aspx?scid=kb;EN-US;Q209187)

  Change the name of the field "Date" to "MyDateField" or whatever and try it
  again.

  Chris Mackin
  www.denverdb.com
  Denver Database Consulting, LLC

  -----Original Message-----
  From: accessd-bounces at databaseadvisors.com
  [mailto:accessd-bounces at databaseadvisors.com]On Behalf Of Software Design &
  Solutions Pty Ltd.
  Sent: Tuesday, April 08, 2003 9:19 PM
  To: AccessD at databaseadvisors.com
  Subject: [AccessD] HELP - Date in SQL string


  Hi all (A2K)

  This line of code works:
      strsql = "INSERT INTO tblItemsInQuote (quoteID, Sequence) VALUES (" &
  IntQuoteID & "," & StrDayNo & ")"
  The debug shows result as:
  INSERT INTO tblItemsInQuote (quoteID, Sequence) VALUES (1,1)

  But I cannot get it right when I amend it to also populate a date field, ie
  using:
  strsql = "INSERT INTO tblItemsInQuote (quoteID, Date, Sequence) VALUES (" &
  IntQuoteID & ",#" & DteDay1 & "#," & StrDayNo & ")"

  The debug shows it as:
  INSERT INTO tblItemsInQuote (quoteID, Date, Sequence) VALUES
  (1,#01/04/03#,1)

  TIA

  Kath Pelletti
  Software Design & Solutions Pty Ltd.
  Ph: 9505-6714
  Fax: 9505-6430
  SDSSoftware at Optusnet.com.au



  _______________________________________________
  AccessD mailing list
  AccessD at databaseadvisors.com
  http://databaseadvisors.com/mailman/listinfo/accessd
  Website: http://www.databaseadvisors.com

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://databaseadvisors.com/pipermail/accessd/attachments/20030409/ecdbd171/attachment-0001.html>


More information about the AccessD mailing list