Skip to Main Content

DevOps, CI/CD and Automation

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Error When Storing GUID in Oracle Raw Field

730691Nov 24 2009 — edited Nov 24 2009
I 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
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 22 2009
Added on Nov 24 2009
0 comments
2,405 views