GUID Fields to string type

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
 
G

Guest

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)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top