D
dew
I have a stored procedure that retrieves the id of a client table, which is
a guid
To get that id, I have
dim clientid as guid = GetClientID("OrgName")
The GetClientID returns a string, because sometimes it's not a guid, but in
this procedure it is.
How do I convert the GetClientID into a Guid? I tried
dim clientid as guid = CType(GetClientID("OrgName"), guid)
but I get an error that says it cannot convert a string into a guid. I even
tried manually inserting a known guid in place of the GetClientID function
and still get the same error.
I tried changing the function GetClientID to return an object, and I get the
same conversion error.
On the other hand, I cannot change ClientID to a string, because then my
stored procedure will not work. My parameter is :
param=cmd.parameters.add("@WorkerID", sqldbtype.uniqueidentifier, 255)
I cannot change the parameter because the stored procedure will not work, if
I change the stored procedure to be a uniqueidentifier, I get an error that
says Syntax .... converting string to a uniqueidentifier.
So what am I missing: I need to retrieve a uniqueidentifier (the client
id), so I can update other records using that clientid and I just don't seem
to have all the ducks in a row.
Thanks for your help.
a guid
To get that id, I have
dim clientid as guid = GetClientID("OrgName")
The GetClientID returns a string, because sometimes it's not a guid, but in
this procedure it is.
How do I convert the GetClientID into a Guid? I tried
dim clientid as guid = CType(GetClientID("OrgName"), guid)
but I get an error that says it cannot convert a string into a guid. I even
tried manually inserting a known guid in place of the GetClientID function
and still get the same error.
I tried changing the function GetClientID to return an object, and I get the
same conversion error.
On the other hand, I cannot change ClientID to a string, because then my
stored procedure will not work. My parameter is :
param=cmd.parameters.add("@WorkerID", sqldbtype.uniqueidentifier, 255)
I cannot change the parameter because the stored procedure will not work, if
I change the stored procedure to be a uniqueidentifier, I get an error that
says Syntax .... converting string to a uniqueidentifier.
So what am I missing: I need to retrieve a uniqueidentifier (the client
id), so I can update other records using that clientid and I just don't seem
to have all the ducks in a row.
Thanks for your help.