just convert the column in the other table to a string and insert the uniqueidentifier as a string in the other table.
Getting and inserting into other table UserId
-
07-12-2021 - |
문제
How can I get with C# logged in UserID to insert it into other database table?
Columns in second table has the same datatype (uniqueidentifier) as column UserId in aspnet_Membership table.
It doesn't work for me if I try to put value of Guid variable type and string:
(...)
public MembershipUser mojObiekt = Membership.GetUser();
(...)
string userID = myObject.ProviderUserKey.ToString();
Guid userkGuid = new Guid(userID);
and convert function to uniqueidentifier in SQL query also doesn't work.
해결책
제휴하지 않습니다 StackOverflow