* VFP code Create table ("c:\temp\GUIDS") (GUID c(16) nocptrans) For ix = 1 to 10 Insert into ("c:\temp\GUIDS") values (GetGuid128bits()) endfor Select GUID, GUID16ToStr(GUID) from ("c:\temp\GUIDS") into cursor crsDecoded Copy To c:\temp\decoded.txt type delimited Close Databases all modi comm c:\temp\decoded.txt Function GetGuid128bits Declare Integer UuidCreate In 'RPCRT4.dll' String @pguid Local pguid pguid=Replicate(Chr(0),16) UuidCreate(@pguid) Return pguid Function GUID16ToStr Lparameters tcGUID Declare Integer StringFromGUID2 In 'Ole32.dll' ; string rguid, String @lpsz, Integer cchMax Local rGUID rGUID=Replicate(Chr(0),80) StringFromGUID2(m.tcGUID,@rGUID,40) return Strconv(Left(rGUID,76),6) EndFunc *C# code using System; using System.Text; using System.Data; using System.Data.OleDb; class GuidTest { public static void Main() { string strCon = @"Provider=VFPOLEDB;Data Source=c:\temp\"; string strSQL = @"select * from 'c:\temp\GUIDS'"; OleDbConnection cn = new OleDbConnection(strCon); cn.Open(); OleDbCommand cmd = new OleDbCommand(strSQL,cn); OleDbDataReader rdr = cmd.ExecuteReader(); while (rdr.Read()) { Guid myGuid = new Guid((byte[])rdr["GUID"]); Console.WriteLine( myGuid.ToString("B") ); } rdr.Close(); cn.Close(); } }Cetin