Error When Storing GUID in Oracle Raw Field
730691Nov 24 2009 — edited Nov 24 2009I have modified the ASP.NET Create User Wizard to gather some additional information and I want to store the additional information in a custom Oracle table along with the GUID from the .net membership provider. I am getting the error "Invalid Hex Number" when my code runs. The error is triggered on the datasource.Insert() statement and appears to be caused when I try to store the GUID in a field type RAW in the Oracle table. I have used the same field type and size for the guid field that is used in the .net membership tables. The code is shown below. What is the problem and what can I do to fix? Thanks
___________________________________________________________________________________________
Protected Sub CreateUserWizard1_CreatedUser(ByVal sender As Object, ByVal e As System.EventArgs) Handles CreateUserWizard1.CreatedUser
Dim UserNameTextBox As TextBox = CType(CreateUserWizardStep1.ContentTemplateContainer.FindControl("UserName"), TextBox)
Dim dataSource As SqlDataSource = CreateUserWizardStep1.ContentTemplateContainer.FindControl("FSCC")
Dim User As MembershipUser = Membership.GetUser(UserNameTextBox.Text)
Dim UserGUID As Object = User.ProviderUserKey
dataSource.InsertParameters("RegisterDate").DefaultValue = DateTime.Now
dataSource.InsertParameters.Add("UserId", UserGUID.ToString())
dataSource.Insert()
End Sub
_________________________________________________________________________________________
Edited by: user12018292 on Nov 24, 2009 6:53 AM