GUID Fields to string type

  • Thread starter Thread starter Jason L James
  • Start date Start date
J

Jason L James

Hi All,

have have merge my CE DB onto my PPC, and now I need to
load some the fields into my VB.Net app. The PK of each
table is of type GUID so that I don't have to work too hard
with my multiple devices and replication. However, I need
to load the field and assign it to the tag field of a node in
a tree view. When I attempt this an exception is raised
saying that the GUID type can not be converted to a string.
I have tried

ctype(myDepRow("dID"), string)

but I still get the same exception.

Does anyone know how I can use the GUID data in my
application (as a string or some other type) that will not
cause an error to be generated.

Thanks,

Jason
 
You should be able to do something like this
ctype(myDepRow("dID"), Guid).ToString()

To get it back to a guid use
Dim dID as new Guid(guidStringHere)
 
Back
Top