Update Field in SQL

Results 1 to 2 of 2

Thread: Update Field in SQL

  1. #1
    Dick Boarman Guest

    Default Update Field in SQL

    I want to update a field with a text line and add a date stamp in the copy:<BR>Example:<BR>(in the comments field)<BR>This request was added on July 22, 2001<BR>My code looks like this:<BR>strTodaysDate = Date()<BR>UPDATE table SET comments = "This request was added on &#039;"&strTodaysDate&"&#039; "<BR>Any ideas on how to make this work?<BR>THanks

  2. #2
    Join Date
    Dec 1969

    Default Nothing to do with SQL...

    Since you are just creating a string, as your comments, just use the standard VBS functions.<BR><BR>SO:<BR><BR>&#060;%<BR>theComment = "This request was added on " & FormatDateTime( Date, vbLongDate )<BR>%&#062;<BR>and then something like<BR><BR>&#060;%<BR>SQL = "UPDATE table SET comments = &#039;" & theComment & "&#039; WHERE somefield = somevalueThatIdsTheRecord"<BR>yourConnection.Execu te( SQL )<BR>%&#062;<BR><BR>

Posting Permissions

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