Professional Web Applications Themes

date field in update stored procedure - Coldfusion Database Access

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....

  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. #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

  3. #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

  4. #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

Similar Threads

  1. Syntax error when trying to update date/time field
    By hazalj in forum Coldfusion Database Access
    Replies: 3
    Last Post: January 31st, 10:17 PM
  2. Pass a Date to stored procedure
    By Mike Lopez in forum ASP.NET Web Services
    Replies: 1
    Last Post: January 25th, 10:06 PM
  3. help with a stored procedure
    By Jason Tesser in forum PostgreSQL / PGSQL
    Replies: 1
    Last Post: January 3rd, 05:35 PM
  4. datagrid update with stored procedure
    By Shannon Ramirez in forum ASP.NET Data Grid Control
    Replies: 1
    Last Post: December 2nd, 02:52 PM
  5. need help on a stored procedure
    By Helixpoint in forum Microsoft SQL / MS SQL Server
    Replies: 0
    Last Post: July 8th, 01:26 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not 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