date field in update stored procedure

Ask a Question related to Coldfusion Database Access, Design and Development.

  1. #1

    Default date field in update stored procedure

    When I try to update a date field that I've previously added to a SQL Server
    table, I get ths error message: Error converting data type varchar to
    datetime. I've tried using CONVERT(#Value#,SQL_TYPE_TIMESTAMP) and
    #CreateODBCDateTime(Value)#, but neither works. Any help would be appreciated.

    lwd Guest

  2. Similar Questions and Discussions

    1. Syntax error when trying to update date/time field
      I am getting a MS Access ODBC Syntax error (missing operator) in query expression '2006-01-05 09:17:01.0' when I try to execute an update query. On...
    2. stored procedure value
      How can I bind a stored procedure value to a page? I've executed a stored procedure and there should be two column values created...i.e. col1 and...
    3. Stored procedure?
      Stored procedure ?? -- Message posted via http://www.dotnetmonster.com
    4. Pass a Date to stored procedure
      Hello. I have a stored procedure that accepts a Date field as one of its parameters. When I try to run the webservice that I wrote to call the...
    5. datagrid update with stored procedure
      I'm using a join statement in a stored procedure and passing in info to the stored procedure. I have a unique key value that comes back in the...
  3. #2

    Default Re: date field in update stored procedure

    Hi

    could you post your code plz.

    or try to use the single quotes for the date when updating it into the table.
    vkunirs Guest

  4. #3

    Default Re: date field in update stored procedure

    From the update form: <input name='P_Date' type='text' value='#trim(P_Date)#'
    size='8' class='bodytext'> From the update template: <CFPROCPARAM type='IN'
    cfsqltype='CF_SQL_DATETIME' dbvarname='@P_Date' value='#P_Date#'> Single
    quotes and double quotes make no difference.

    ldy Guest

  5. #4

    Default Re: date field in update stored procedure

    I can't imagine this would give you the error you are receiving, but you don't
    need the @ in teh dbvarname in the stored procedure. It's only required on the
    SP end. Take that out, use double quotes and see what happens...in fact, I'll
    test myself and see if I get the same error.

    quig06107 Guest

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139