Last post Mar 13, 2009 10:29 AM by jahmekyat
Mar 12, 2009 08:27 PM|jahmekyat|LINK
I'm still new to asp.net and was hoping that someone could help me with an issue that I'm having. On SqlDataSource_Insert, I'm grabbing the users unique MemberID and adding to the db. Adding the MemberID works great. I also want to add a unique EventID for
the event they are submitting, but the code that I'm using below just inserts a guid with all zeros. Any suggestions?
Mar 13, 2009 02:26 AM|asifchouhan|LINK
instead of this
e.Command.Parameters("@EventId").Value = eventId
e.Command.Parameters("@EventId").Value = Guid.NewGuid.ToString
If your issue is solved. Mark it as "ANSWER"
Mar 13, 2009 02:37 AM|TinyPond|LINK
Since you are using a sql data source why not construct an Identity column in sql server . I am assuming you are writing information to a database and the unique column would be used to reference the data at , as part of some relationship. Thats my two
Mar 13, 2009 10:29 AM|jahmekyat|LINK
Thanks for a quick reply and your expertise! That did the trick. Slowly but surely I'm learning this stuff.