<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:clearspace="http://www.jivesoftware.com/xmlns/jive/rss" version="2.0">
  <channel>
    <title>Adobe Community: Message List - objectGUID in a ms sql databse in a varchar(100) column</title>
    <link>https://forums.adobe.com/community/coldfusion/coldfusion_database?view=discussions</link>
    <description>Most recent forum messages</description>
    <language>en</language>
    <pubDate>Tue, 28 Oct 2014 15:26:01 GMT</pubDate>
    <generator>Jive Engage 7.0.0.1  (http://jivesoftware.com/products/)</generator>
    <dc:date>2014-10-28T15:26:01Z</dc:date>
    <dc:language>en</dc:language>
    <item>
      <title>Re: objectGUID in a ms sql databse in a varchar(100) column</title>
      <link>https://forums.adobe.com/message/6875645?tstart=0#6875645</link>
      <description>&lt;!-- [DocumentBodyStart:536caa61-9c64-4ea9-8592-5fd61b399ba8] --&gt;&lt;div class="jive-rendered-content"&gt;&lt;p&gt;Using afceait's sample from March 28th above, you can filter on objectGUID by escaping the converted binary sthex substrings with '\' as shown here:&lt;/p&gt;&lt;p&gt;&amp;lt;cfset SrchStr = '\'&amp;amp; mid(#sthex#,1,2)&amp;gt;&lt;/p&gt;&lt;p&gt;&amp;lt;cfset SrchStr = SrchStr &amp;amp; '\'&amp;amp; mid(sthex,3,2)&amp;gt;&lt;/p&gt;&lt;p&gt;&amp;lt;cfset SrchStr = SrchStr &amp;amp; '\'&amp;amp; mid(sthex,5,2)&amp;gt;&lt;/p&gt;&lt;p&gt;&amp;lt;cfset SrchStr = SrchStr &amp;amp; '\'&amp;amp; mid(sthex,7,2)&amp;gt;&lt;/p&gt;&lt;p&gt;&amp;lt;cfset SrchStr = SrchStr &amp;amp; '\'&amp;amp; mid(sthex,9,2)&amp;gt;&lt;/p&gt;&lt;p&gt;&amp;lt;cfset SrchStr = SrchStr &amp;amp; '\'&amp;amp; mid(sthex,11,2)&amp;gt;&lt;/p&gt;&lt;p&gt;&amp;lt;cfset SrchStr = SrchStr &amp;amp; '\'&amp;amp; mid(sthex,13,2)&amp;gt;&lt;/p&gt;&lt;p&gt;&amp;lt;cfset SrchStr = SrchStr &amp;amp; '\'&amp;amp; mid(sthex,15,2)&amp;gt;&lt;/p&gt;&lt;p&gt;&amp;lt;cfset SrchStr = SrchStr &amp;amp; '\'&amp;amp; mid(sthex,17,2)&amp;gt;&lt;/p&gt;&lt;p&gt;&amp;lt;cfset SrchStr = SrchStr &amp;amp; '\'&amp;amp; mid(sthex,19,2)&amp;gt;&lt;/p&gt;&lt;p&gt;&amp;lt;cfset SrchStr = SrchStr &amp;amp; '\'&amp;amp; mid(sthex,21,2)&amp;gt;&lt;/p&gt;&lt;p&gt;&amp;lt;cfset SrchStr = SrchStr &amp;amp; '\'&amp;amp; mid(sthex,23,2)&amp;gt;&lt;/p&gt;&lt;p&gt;&amp;lt;cfset SrchStr = SrchStr &amp;amp; '\'&amp;amp; mid(sthex,25,2)&amp;gt;&lt;/p&gt;&lt;p&gt;&amp;lt;cfset SrchStr = SrchStr &amp;amp; '\'&amp;amp; mid(sthex,27,2)&amp;gt;&lt;/p&gt;&lt;p&gt;&amp;lt;cfset SrchStr = SrchStr &amp;amp; '\'&amp;amp; mid(sthex,29,2)&amp;gt;&lt;/p&gt;&lt;p&gt;&amp;lt;cfset SrchStr = SrchStr &amp;amp; '\'&amp;amp; mid(sthex,31,2)&amp;gt;&lt;/p&gt;&lt;p&gt;&amp;lt;cfdump var="#SrchStr#"&amp;gt;&lt;/p&gt;&lt;p style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Then you can do &lt;br/&gt;&amp;lt;cfldap .....&lt;/p&gt;&lt;p&gt;filter = "objectGUID=#SrchStr#"&lt;/p&gt;&lt;p&gt;...&lt;/p&gt;&lt;p&gt;&amp;gt;&lt;/p&gt;&lt;/div&gt;&lt;!-- [DocumentBodyEnd:536caa61-9c64-4ea9-8592-5fd61b399ba8] --&gt;&lt;img src='/beacon?t=1415921063267' /&gt;</description>
      <pubDate>Tue, 28 Oct 2014 15:26:01 GMT</pubDate>
      <author>forums_noreply@adobe.com</author>
      <guid>https://forums.adobe.com/message/6875645?tstart=0#6875645</guid>
      <dc:date>2014-10-28T15:26:01Z</dc:date>
      <clearspace:dateToText>2 weeks 2 days ago</clearspace:dateToText>
      <clearspace:objectType>0</clearspace:objectType>
    </item>
    <item>
      <title>Re: objectGUID in a ms sql databse in a varchar(100) column</title>
      <link>https://forums.adobe.com/message/6250443?tstart=0#6250443</link>
      <description>&lt;!-- [DocumentBodyStart:9b3d3cb5-df1e-46f8-bdf4-a91532efe2eb] --&gt;&lt;div class="jive-rendered-content"&gt;&lt;p&gt;&amp;lt;cfldap &lt;/p&gt;&lt;p&gt;server = "server ip/name"&lt;/p&gt;&lt;p&gt;username="adminuser"&lt;/p&gt;&lt;p&gt;password="adminpass"&lt;/p&gt;&lt;p&gt;action = "query"&lt;/p&gt;&lt;p&gt;name = "results"&lt;/p&gt;&lt;p&gt;start = "CN=Users,dc=domain,dc=org"&lt;/p&gt;&lt;p&gt;filter = ""&lt;/p&gt;&lt;p&gt;attributes = "objectGUID,cn,displayName,givenName,sn,DN,o,Description,company,department,physicalDeliv eryOfficeName,title,mail,telephonenumber,mobile,streetAddress,l,st,postalCode,c,info"&lt;/p&gt;&lt;p&gt;returnAsBinary="objectGUID" &lt;/p&gt;&lt;p&gt;sort = "sn ASC"&amp;gt;&lt;/p&gt;&lt;p style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;lt;cfoutput query = "results"&amp;gt;&lt;/p&gt;&lt;p style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;lt;cfset hexguid = BinaryEncode(objectGUID,"Hex")&amp;gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;lt;cfset sthex = toString(hexguid)&amp;gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;lt;cfset GuidStr = mid(#sthex#,7,2)&amp;gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;lt;cfset GuidStr = GuidStr &amp;amp; mid(sthex,5,2)&amp;gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;lt;cfset GuidStr = GuidStr &amp;amp; mid(sthex,3,2)&amp;gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;lt;cfset GuidStr = GuidStr &amp;amp; mid(sthex,1,2)&amp;gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;lt;cfset GuidStr = GuidStr &amp;amp; mid(sthex,11,2)&amp;gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;lt;cfset GuidStr = GuidStr &amp;amp; mid(sthex,9,2)&amp;gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;lt;cfset GuidStr = GuidStr &amp;amp; mid(sthex,15,2)&amp;gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;lt;cfset GuidStr = GuidStr &amp;amp; mid(sthex,13,2)&amp;gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;lt;cfset GuidStr = GuidStr &amp;amp; mid(sthex,17,18)&amp;gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;lt;cfset TempGuid = left(GuidStr,8) &amp;amp; "-" &amp;amp; mid(GuidStr,9,4) &amp;amp; "-" &amp;amp; mid(GuidStr,13,4) &amp;amp; "-" &amp;amp; mid(GuidStr,17,4) &amp;amp; "-" &amp;amp; mid(GuidStr,21,18) &amp;gt;&lt;/p&gt;&lt;p style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp; #displayName#: ObjectGUID before: #sthex# | objectGUID Parsed: #TempGuid#&amp;lt;br&amp;gt;&lt;/p&gt;&lt;p style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;lt;/cfoutput&amp;gt;&lt;/p&gt;&lt;/div&gt;&lt;!-- [DocumentBodyEnd:9b3d3cb5-df1e-46f8-bdf4-a91532efe2eb] --&gt;</description>
      <pubDate>Fri, 28 Mar 2014 14:26:35 GMT</pubDate>
      <author>forums_noreply@adobe.com</author>
      <guid>https://forums.adobe.com/message/6250443?tstart=0#6250443</guid>
      <dc:date>2014-03-28T14:26:35Z</dc:date>
      <clearspace:dateToText>7 months 2 weeks ago</clearspace:dateToText>
      <clearspace:objectType>0</clearspace:objectType>
    </item>
    <item>
      <title>Re: objectGUID in a ms sql databse in a varchar(100) column</title>
      <link>https://forums.adobe.com/message/2098301?tstart=0#2098301</link>
      <description>&lt;!-- [DocumentBodyStart:290180a2-f49b-407e-a590-12240b502549] --&gt;&lt;div class="jive-rendered-content"&gt;&lt;p&gt;Does anyone know how to do the reverse of&lt;/p&gt;&lt;p style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;lt;cfset results.objectGUID = binaryencode(results.objectGUID,"HEX")&amp;gt;&lt;/p&gt;&lt;p style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;so that you can use the objectGUID in the&lt;/p&gt;&lt;p style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;lt;cfldap filter&lt;/p&gt;&lt;p style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;?&lt;/p&gt;&lt;/div&gt;&lt;!-- [DocumentBodyEnd:290180a2-f49b-407e-a590-12240b502549] --&gt;</description>
      <pubDate>Fri, 10 Jul 2009 12:27:05 GMT</pubDate>
      <author>forums_noreply@adobe.com</author>
      <guid>https://forums.adobe.com/message/2098301?tstart=0#2098301</guid>
      <dc:date>2009-07-10T12:27:05Z</dc:date>
      <clearspace:dateToText>5 years 4 months ago</clearspace:dateToText>
      <clearspace:replyCount>2</clearspace:replyCount>
      <clearspace:objectType>0</clearspace:objectType>
    </item>
    <item>
      <title>Re: objectGUID in a ms sql databse in a varchar(100) column</title>
      <link>https://forums.adobe.com/message/2098300?tstart=0#2098300</link>
      <description>&lt;!-- [DocumentBodyStart:3641bb44-fb76-4768-9892-0a8b908f6ad5] --&gt;&lt;div class="jive-rendered-content"&gt;&lt;p&gt;This is the magic code:&lt;/p&gt;&lt;p style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;lt;cfset results.objectGUID = binaryencode(results.objectGUID,"HEX")&amp;gt;&lt;/p&gt;&lt;/div&gt;&lt;!-- [DocumentBodyEnd:3641bb44-fb76-4768-9892-0a8b908f6ad5] --&gt;</description>
      <pubDate>Fri, 10 Jul 2009 12:25:54 GMT</pubDate>
      <author>forums_noreply@adobe.com</author>
      <guid>https://forums.adobe.com/message/2098300?tstart=0#2098300</guid>
      <dc:date>2009-07-10T12:25:54Z</dc:date>
      <clearspace:dateToText>5 years 4 months ago</clearspace:dateToText>
      <clearspace:replyCount>3</clearspace:replyCount>
      <clearspace:objectType>0</clearspace:objectType>
    </item>
    <item>
      <title>Re: objectGUID in a ms sql databse in a varchar(100) column</title>
      <link>https://forums.adobe.com/message/2093342?tstart=0#2093342</link>
      <description>&lt;!-- [DocumentBodyStart:1ba2ecf9-4f9c-45ee-8fb1-51e973b6e827] --&gt;&lt;div class="jive-rendered-content"&gt;&lt;p&gt;Mabye this is the solution from another website:&lt;/p&gt;&lt;p style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;em&gt;&lt;span style="text-decoration: underline;"&gt;&lt;strong&gt;&lt;br/&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/em&gt;&lt;/p&gt;&lt;p&gt;&lt;em&gt;&lt;span style="text-decoration: underline;"&gt;&lt;strong&gt;Can anyone please explain how to get the objectguid binary attribute from Active&amp;nbsp; Directory using cfldap and store it in the database? I need this so as to maintain a global unique id both in the AD and in my&amp;nbsp; database for the users.&amp;nbsp; Thanks&lt;/strong&gt;&lt;/span&gt;&lt;/em&gt;&lt;/p&gt;&lt;p&gt;&lt;em&gt;&lt;span style="text-decoration: underline;"&gt;&lt;strong&gt;&lt;br/&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/em&gt;&lt;/p&gt;&lt;p&gt;&lt;em&gt;&lt;span style="text-decoration: underline;"&gt;&lt;strong&gt;&lt;br/&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/em&gt;&lt;/p&gt;&lt;p&gt;&lt;em&gt;&lt;span style="text-decoration: underline;"&gt;&lt;strong&gt;You'll probably have to use JLDAP for this - CFLDAP has many shortcomings that&amp;nbsp; we've used JLDAP to work around. It's a very simple API and everything works from&amp;nbsp; within CF. I've blogged a few of things we've done, so that should get you&amp;nbsp; started: &lt;/strong&gt;&lt;/span&gt;&lt;/em&gt;&lt;/p&gt;&lt;p&gt;&lt;em&gt;&lt;span style="text-decoration: underline;"&gt;&lt;strong&gt;&lt;br/&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/em&gt;&lt;/p&gt;&lt;p&gt;&lt;em&gt;&lt;span style="text-decoration: underline;"&gt;&lt;strong&gt;&lt;a class="jive-link-external-small" href="http://www.d-ross.org/index.cfm?objectid=9C65EEF0-508B-E116-6F30CA79F5BFDE07" rel="nofollow"&gt;http://www.d-ross.org/index.cfm?objectid=9C65EEF0-508B-E116-6F30CA79F5BFDE07&lt;/a&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/em&gt;&lt;/p&gt;&lt;p&gt;&lt;em&gt;&lt;span style="text-decoration: underline;"&gt;&lt;strong&gt;&lt;a class="jive-link-external-small" href="http://www.d-ross.org/index.cfm?objectid=9C65EF0F-508B-E116-6F851C474448E08B" rel="nofollow"&gt;http://www.d-ross.org/index.cfm?objectid=9C65EF0F-508B-E116-6F851C474448E08B&lt;/a&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/em&gt;&lt;/p&gt;&lt;p&gt;&lt;em&gt;&lt;span style="text-decoration: underline;"&gt;&lt;strong&gt;&lt;a class="jive-link-external-small" href="http://www.d-ross.org/index.cfm?objectid=9C65ED79-508B-E116-6F81AF8F75FB40AD" rel="nofollow"&gt;http://www.d-ross.org/index.cfm?objectid=9C65ED79-508B-E116-6F81AF8F75FB40AD&lt;/a&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/em&gt;&lt;/p&gt;&lt;p&gt;&lt;em&gt;&lt;span style="text-decoration: underline;"&gt;&lt;strong&gt; Terry Ryan used a lot of this work to create a CFC that you can use: &lt;/strong&gt;&lt;/span&gt;&lt;/em&gt;&lt;/p&gt;&lt;/div&gt;&lt;!-- [DocumentBodyEnd:1ba2ecf9-4f9c-45ee-8fb1-51e973b6e827] --&gt;</description>
      <pubDate>Wed, 08 Jul 2009 16:02:24 GMT</pubDate>
      <author>forums_noreply@adobe.com</author>
      <guid>https://forums.adobe.com/message/2093342?tstart=0#2093342</guid>
      <dc:date>2009-07-08T16:02:24Z</dc:date>
      <clearspace:dateToText>5 years 4 months ago</clearspace:dateToText>
      <clearspace:replyCount>4</clearspace:replyCount>
      <clearspace:objectType>0</clearspace:objectType>
    </item>
    <item>
      <title>Re: objectGUID in a ms sql databse in a varchar(100) column</title>
      <link>https://forums.adobe.com/message/2093323?tstart=0#2093323</link>
      <description>&lt;!-- [DocumentBodyStart:8a665417-9c8e-426a-b44e-1f0c751b71bb] --&gt;&lt;div class="jive-rendered-content"&gt;&lt;p&gt;Hmm after passing this value to flex I though it would be a simple piece of data that I could pass back to CF, it turns out to be an array in flex so that makes it not possible to return to coldfusion to check it is the same as a value in the ms sql database.&lt;/p&gt;&lt;p style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="min-height: 8pt; padding: 0px;"&gt;&lt;span aria-label="Sad" class="emoticon-inline emoticon_sad" style="height:16px;width:16px;"&gt;&lt;/span&gt;&amp;nbsp;&lt;/p&gt;&lt;/div&gt;&lt;!-- [DocumentBodyEnd:8a665417-9c8e-426a-b44e-1f0c751b71bb] --&gt;</description>
      <pubDate>Wed, 08 Jul 2009 16:01:26 GMT</pubDate>
      <author>forums_noreply@adobe.com</author>
      <guid>https://forums.adobe.com/message/2093323?tstart=0#2093323</guid>
      <dc:date>2009-07-08T16:01:26Z</dc:date>
      <clearspace:dateToText>5 years 4 months ago</clearspace:dateToText>
      <clearspace:replyCount>5</clearspace:replyCount>
      <clearspace:objectType>0</clearspace:objectType>
    </item>
    <item>
      <title>Re: objectGUID in a ms sql databse in a varchar(100) column</title>
      <link>https://forums.adobe.com/message/2090320?tstart=0#2090320</link>
      <description>&lt;!-- [DocumentBodyStart:a28664fa-41e7-42f8-9122-24248c1f99e0] --&gt;&lt;div class="jive-rendered-content"&gt;&lt;p&gt;Hmm after passing this value to flex I though it would be a simple piece of data that I could pass back to CF, it turns out to be an array in flex so that makes it not possible to return to coldfusion to check it is the same as a value in the ms sql database.&lt;/p&gt;&lt;p style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="min-height: 8pt; padding: 0px;"&gt;&lt;span aria-label="Sad" class="emoticon-inline emoticon_sad" style="height:16px;width:16px;"&gt;&lt;/span&gt;&amp;nbsp;&lt;/p&gt;&lt;/div&gt;&lt;!-- [DocumentBodyEnd:a28664fa-41e7-42f8-9122-24248c1f99e0] --&gt;</description>
      <pubDate>Tue, 07 Jul 2009 14:51:41 GMT</pubDate>
      <author>forums_noreply@adobe.com</author>
      <guid>https://forums.adobe.com/message/2090320?tstart=0#2090320</guid>
      <dc:date>2009-07-07T14:51:41Z</dc:date>
      <clearspace:dateToText>5 years 4 months ago</clearspace:dateToText>
      <clearspace:replyCount>6</clearspace:replyCount>
      <clearspace:objectType>0</clearspace:objectType>
    </item>
    <item>
      <title>objectGUID in a ms sql databse in a varchar(100) column</title>
      <link>https://forums.adobe.com/message/2089911?tstart=0#2089911</link>
      <description>&lt;!-- [DocumentBodyStart:b7a9e05a-9b1d-46b7-aa00-04a1709f42e9] --&gt;&lt;div class="jive-rendered-content"&gt;&lt;p&gt;HI&lt;/p&gt;&lt;p style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;I'm doing&lt;/p&gt;&lt;p style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&amp;nbsp; returnAsBinary = "objectGUID"&lt;/p&gt;&lt;p style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;in a &amp;lt;cfldap&amp;gt; query.&lt;/p&gt;&lt;p style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;I was thinking of storing this value returned by objectGUID in a ms sql databse in a varchar(100) column as a primary key. Can you see any pitfalls with this method?&lt;/p&gt;&lt;/div&gt;&lt;!-- [DocumentBodyEnd:b7a9e05a-9b1d-46b7-aa00-04a1709f42e9] --&gt;</description>
      <pubDate>Tue, 07 Jul 2009 12:33:45 GMT</pubDate>
      <author>forums_noreply@adobe.com</author>
      <guid>https://forums.adobe.com/message/2089911?tstart=0#2089911</guid>
      <dc:date>2009-07-07T12:33:45Z</dc:date>
      <clearspace:dateToText>5 years 4 months ago</clearspace:dateToText>
      <clearspace:replyCount>7</clearspace:replyCount>
      <clearspace:objectType>0</clearspace:objectType>
    </item>
  </channel>
</rss>

