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

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Initial get page response times and IIS8 15 55
encoding an href string 2 24
Jquery datatables integration with ASP.NET MVC, bootstrap 3 22
Easy filter aspnet 2 24
One of the pain points with developing AJAX, JavaScript, JQuery, and other client-side behaviors is that JavaScript doesn’t allow for cross domain request for pulling content. For example, JavaScript code on www.johnchapman.name could not pull conte…
Problem Hi all,    While many today have fast Internet connection, there are many still who do not, or are connecting through devices with a slower connect, so light web pages and fast load times are still popular.    If your ASP.NET page …
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

856 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