sp using a uniqueidentifier

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

  1. #1

    Default sp using a uniqueidentifier

    when I try to run a stored procedure which contains a select statement I get

    [Macromedia][SQLServer JDBC Driver][SQLServer]Syntax error converting from a
    character string to uniqueidentifier.

    I have tried casting the past param, setting it to CF_SQL_VARCHAR,
    CF_SQL_IDSTAMP, ive tried with and without single quotes and still get the same
    error. Any help on the correct method of doing this would be helpful.

    WAH

    wah222 Guest

  2. Similar Questions and Discussions

    1. uniqueidentifier
      Hi, I have different attributes with the data types as follows: EmpID uniqueidentifier EmpName Char EmpSal Int I am not...
    2. How to use uniqueidentifier fields a return dataset from a webserv
      I have made a web service that returns a typed dataset that includes a uniqueidentifier field. When I import this web service into visual studio...
    3. Is it possible to use uniqueidentifier in a web service type Datas
      I have made a web service that returns a typed dataset that includes a uniqueidentifier field. When I import this web service into visual studio...
    4. uniqueidentifier-0.2
      Hi Everyone Has anyone been able to compile uniqueidentifier-0.2 on the openBSD 3.6 environment with Postgresql 7.4.3? We need to use this...
    5. #24752 [NEW]: unknown column type "uniqueidentifier", type 35
      From: s dot sonnenberg at coolspot dot de Operating system: Linux PHP version: 4.3.2 PHP Bug Type: MSSQL related Bug...
  3. #2

    Default Re: sp using a uniqueidentifier

    It works fine for me. Is the procedure parameter type "uniqueIdentifier" or
    "char"? If it is "char" did you make sure the length is long enough?



    create procedure testUUID (@uuid uniqueIdentifier)
    as
    begin
    select titleColumn from yourTable where uuidColumn = @uuid
    end
    go

    <cfset yourUUID = "6F9619FF-8B86-D011-B42D-00C04FC964FF">
    <cfstoredproc procedure="testUUID" datasource="#yourDSN#">
    <cfprocparam dbvarname="@uuid" cfsqltype="CF_SQL_IDSTAMP" type="in"
    value="#yourUUID#">
    <cfprocresult name="results">
    </cfstoredproc>
    <cfdump var="#results#">

    mxstu 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