Professional Web Applications Themes

GUID and CFProcParam - Coldfusion Database Access

I have a new client who is using GUID's as the primary key of their Customer table rather than the integer that most of my other clients use. When passing a value for one of these GUID's into a SQL Server stored procedure from ColdFusion, what datatype (cfsqltype) should I use? Is this what cf_sql_idstamp would be used for? I can't seem to find an explanation of what the different cfsqltypes mean anywhere. Most are pretty self explanatory, but others? Thanks in advance for any light you can shed on this....

  1. #1

    Default GUID and CFProcParam

    I have a new client who is using GUID's as the primary key of their Customer
    table rather than the integer that most of my other clients use. When passing
    a value for one of these GUID's into a SQL Server stored procedure from
    ColdFusion, what datatype (cfsqltype) should I use? Is this what
    cf_sql_idstamp would be used for? I can't seem to find an explanation of what
    the different cfsqltypes mean anywhere. Most are pretty self explanatory, but
    others?

    Thanks in advance for any light you can shed on this.

    DeliK Guest

  2. #2

    Default Re: GUID and CFProcParam

    Use cf_sql_char with a max length of 36. GUIDs are 32 characters with 4 hyphens.

    I found the following chart awhile back, it's very handy. It's a cross
    reference of cf_sql_types to various database data types.

    [url]http://www.blinex.com/~sam/CF_SQL_TYPES.cfm[/url]

    sthompson Guest

  3. #3

    Default Re: GUID and CFProcParam

    Thank you so much for the reply and especially for the chart! That will certainly come in handy!
    DeliK Guest

  4. #4

    Default Re: GUID and CFProcParam

    sthompson,

    Nice reference table. The sql server entries for cf_sql_char and
    cf_sql_idstamp look the same. Have you tried using cf_sql_idstamp instead
    cf_sql_char ... and if you have ....any problems?

    mxstu Guest

  5. #5

    Default Re: GUID and CFProcParam

    I haven't done anything with cf_sql_idstamp. We've just always used cf_sql_char. I guess just give it a try. If it s up, then I would recommend not using it :D.
    sthompson Guest

  6. #6

    Default Re: GUID and CFProcParam

    Perhaps that's why the idstamp type is mentioned so infrequently ;)

    Definitely let me know. I don't have access to sql server db at the moment, but I'm curious about the results. Thanks!
    mxstu Guest

Similar Threads

  1. cfprocparam and ORACLE
    By tee4 in forum Coldfusion Database Access
    Replies: 9
    Last Post: May 9th, 04:05 PM
  2. CFProcParam - MX7
    By paross1 in forum Coldfusion Database Access
    Replies: 4
    Last Post: April 6th, 04:04 PM
  3. Problem with cfsqltype attribute of cfprocparam
    By steve458412 in forum Coldfusion Database Access
    Replies: 2
    Last Post: February 15th, 09:37 AM
  4. Max number of decimal places in cfprocparam?
    By dsmith in forum Coldfusion Database Access
    Replies: 1
    Last Post: June 22nd, 06:10 PM
  5. Retrieving GUID from DB2 UDB
    By Knut Stolze in forum IBM DB2
    Replies: 0
    Last Post: August 6th, 07:55 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