convert string to guid

R

Random

How can I convert a system.string value to a system.guid? I know the string
is a valid guid. All I'm trying to do is to pass the value into a stored
procedure that accepts a guid. The wrapper function I have for this would
need to convert the string parameter it receives and convert it to a guid
for executing the stored procedure. I could probably modify the sproc to
accept the string and do the convert itself, but I'd rather extract it out
to my wrapper function.
 
S

Saravana

Either one of this method
Dim a As New System.Data.SqlTypes.SqlGuid("s")

Dim a As New Guid("your string")
 

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