Jon Chamberlain

Results 1 to 3 of 3

Thread: Jon Chamberlain

  1. #1
    Jon Chamberlain Guest

    Default Jon Chamberlain

    I am trying to update a datetime field in sql server 7 with the current date from an asp page. <BR><BR>the sql code - set date = # 27/02/01 # - which worked with an access database returns an error in sql server 7. The error message is ADO Error: Line 1 : Incorrect Syntax near &#039;27&#039; <BR><BR>Can anyone help?

  2. #2
    Join Date
    Dec 1969

    Default SQL datetime updates

    Replace the # with &#039; (single quotes) -I&#039;m not too sure about the spaces either.....

  3. #3
    Ed Davison Guest

    Default RE: Jon Chamberlain

    I am really not sure what you are trying to do. Your sql code<BR> set date = # 27/02/01 #<BR>does not look like valid sql code. What you need to do is something more standard like<BR> update table set datecolumn = &#039;27/02/01&#039; where idcolumn = 1<BR>or some other valid where clause. This will properly convert to a datetime field in SQL Server 7.<BR><BR>Ed Davison<BR>Sr. Systems Analyst (Database Administrator)<BR>McCombs School of Business, UT Austin<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