Solved

'dsUserAccounts.UserAccountDetailsRow.Private Sub New(rb As System.Data.DataRowBuilder)' is not accessible in this context because it is 'Private'.

Posted on 2006-07-07
2
299 Views
Last Modified: 2007-12-19
I am having a strongly typed dataset 'dsUserAccounts' with table adapter 'UserAccountDetailsTableAdapter'.

I am getting a error at line    Dim UserInfo As New dsUserAccounts.UserAccountDetailsRow


      Here is my code



            Dim AccountDetailsTableAdapter As New dsUserAccountsTableAdapters.UserAccountDetailsTableAdapter
            Dim AccountProfiles As New dsUserAccounts.UserAccountDetailsDataTable
            Dim UserInfo As New dsUserAccounts.UserAccountDetailsRow

            AccountProfiles = AccountDetailsTableAdapter.GetUserAccountDetails(Request.QueryString("UserID"))

            For Each UserInfo In AccountProfiles

                EmailAddress.Text = LTrim(RTrim(UserInfo.EMAIL_ADDRESS_ID))
                cboSecurityQuestion.SelectedValue = UserInfo.SECURITY_QUESTION_ID
                SecurityAnswer.Text = LTrim(RTrim(UserInfo.SECURITY_ANSWER))
                Password.Text = UserInfo.PASSWORD

                FirstName.Text = LTrim(RTrim(UserInfo.FIRST_NAME))
                LastName.Text = LTrim(RTrim(UserInfo.LAST_NAME))
                AddressLine1.Text = LTrim(RTrim(UserInfo.ADDRESS_LINE1))
                AddressLine2.Text = LTrim(RTrim(UserInfo.ADDRESS_LINE2))
                City.Text = LTrim(RTrim(UserInfo.CITY))
                States.Text = LTrim(RTrim(UserInfo.STATE))
                cboCountry.SelectedValue = UserInfo.COUNTRY_ID
                ZipCode.Text = LTrim(RTrim(UserInfo.ZIP_CODE))
                ContactPhone.Text = LTrim(RTrim(UserInfo.CONTACT_PHONE))
                If Not IsDBNull(UserInfo.FAX_NUMBER) Then FaxNumber.Text = LTrim(RTrim(UserInfo.FAX_NUMBER))
                cboReferralSource.SelectedValue = UserInfo.REFERRAL_SOURCE_ID


            Next
0
Comment
Question by:GSK_DEV
2 Comments
 
LVL 7

Expert Comment

by:kGenius
ID: 17064085
Change "Private Sub New" in UserAccountDetailsRow to "Public Sub New"...

hope this'll help
kGenius
0
 
LVL 96

Accepted Solution

by:
Bob Learned earned 125 total points
ID: 17065249
You have to let the table handle creating a new row, and since you are using a strong-typed DataSet, then you need to call the specific method--the generic method is Table.NewRow.

So, try this:
   Dim UserInfo As dsUserAccounts.NewUserAccountDetailsRow()

Bob
0

Featured Post

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

AJAX ModalPopupExtender has a required property "TargetControlID" which may seem to be very confusing to new users. It means the server control that will be extended by the ModalPopup, for instance, if when you click a button, a ModalPopup displays,…
In .NET 2.0, Microsoft introduced the Web Site.  This was the default way to create a web Project in Visual Studio 2005.  In Visual Studio 2008, the Web Application has been restored as the default web Project in Visual Studio/.NET 3.x The Web Si…
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

707 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now