what type of variable for a UniqueIdentifier field?

B

Bart

Hi,

i made a select which fetches the value of a UniqueIdentifier field
(aspnet_Roles.RoleId )
my questions are:
1) variable 'myrole' must be defined as what?
2) myrole=dtreader.Get??

Thanks
Bart

dim myrole as ???
comd.CommandText = "select aspnet_Roles.RoleId from aspnet_roles"
connection.Open()
dtreader = comd.ExecuteReader
dtreader.Read()
myrole = dtreader.Get???
 
M

Mark Fitzpatrick

A uniqueidentifier is a Globally Unique Identifier, which is a System.Guid
data structure. I think you would use GetGuid() with the sql data reader.

Hope this helps,
Mark Fitzpatrick
Microsoft MVP - Expression
 

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

Members online

Forum statistics

Threads
473,769
Messages
2,569,576
Members
45,054
Latest member
LucyCarper

Latest Threads

Top