Convert byte array from Oracle RAW to System.Guid?

前端 未结 3 1184
失恋的感觉
失恋的感觉 2021-01-02 04:29

My app interacts with both Oracle and SQL Server databases using a custom data access layer written in ADO.NET using DataReaders. Right now I\'m having a problem with the c

3条回答
  •  半阙折子戏
    2021-01-02 04:57

    I have vague recollections that the GUIDs from Oracle are effectively reversed compared with the order .NET expects.

    Try reversing the array before calling the Guid constructor.

    It may not be quite as simple as reversing, however - you may need to do more detailed swapping. I suggest you create a GUID where each byte is easy to identify (use 0x01, 0x23, 0x45 etc) and work from there.

提交回复
热议问题