SQL 7 - UniqueIdentifier

Results 1 to 3 of 3

Thread: SQL 7 - UniqueIdentifier

  1. #1
    James W. Herubin Guest

    Default SQL 7 - UniqueIdentifier

    I have the following script:<BR><BR>&#060;%<BR> Set cnConn = Server.CreateObject ("ADODB.Connection")<BR> Set rsRec = Server.CreateObject ("ADODB.Recordset")<BR> <BR> strConn = "Driver={SQL Server}; Server=BMESQL; Database=itdata; UID=sa; PWD="<BR> <BR> cnConn.Open strConn<BR><BR> rsRec.Open "tblStaff", strConn, adOpenKeyset, adLockOptimistic, adCmdTable<BR><BR> Response.Write rsRec.Fields("sLastName")<BR> Response.Write rsRec.Fields("pkGUID")<BR><BR>%&#062;<BR><BR>The LastName gets returned fine but the GUID gets returned as: "s???????" instead of the expected {05DD015.......}.<BR><BR>Anyone have some ideas on this? The kicker is that when I was developing it on my local machine things were being returned correctly. When I moved the script to our intranet server it started returning garbage for the GUID. Thanks in advance.<BR><BR>Jim Herubin<BR>face@herubin.com

  2. #2
    Join Date
    Dec 1969
    Posts
    21

    Default Check DataType

    Check the DataType for this field. It must be a VarBinary field, due to which the result looks garbage.

  3. #3
    James W. Herubin Guest

    Default RE: Check DataType

    Actually the problem has been solved. I discovered that a previous version of MS Data Access Components was installed on the intranet server that can&#039t handle the SQL 7 UniqueIdentifier datatype. I believe the GUID is a 16 byte hexadecimal number that is not supported by MSDAC 1.5. I upgraded the server to version 2.1 and everything is cool. <BR><BR>Thanks for the response.<BR><BR>Jim

Posting Permissions

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