I am trying to insert data to UserCars table using ObjectDataSource Insert Method. the userId(FOREIGN KEY) I am trying to insert is GUID type.
The primary key is UserId(uniq开发者_StackOverflow中文版eidentifier)
in aspnet_users table which is part of Membrship schema.
userId(guid) = JustCreateduser
so it means it should be the same values.
See if it really does exist:
SELECT * FROM aspnet_users WHERE UserIDGUID = @TheGuidBeingInserted
If you're having trouble getting info on what's actually happening, do a trace in SQL Profiler, capturing SQL statement completion, SP statement completion, RPC call completion, and RPC output parameter (just in case the GUID is coming back from a call).
That should give you some ideas to be able to proceed forward with solving the problem.
Have you confirmed that the guid does actually exist in the aspnet_users table prior to inserting it into the UserCars table?
精彩评论