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
314 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

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

832 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