problem with daab and pasing dataset in application tier

Last post 09-18-2006 3:53 AM by Jasson_King. 1 replies.

Sort Posts:

  • problem with daab and pasing dataset in application tier

    09-18-2006, 1:11 AM
    • Member
      25 point Member
    • raquidd
    • Member since 12-23-2005, 5:14 PM
    • Posts 5
    hello
    i learn with article

    http://msdn.microsoft.com/practices/apptype/webapps/default.aspx?pull=/library/en-us/dnpag/html/diforwc-ap02.asp#diforwc-ap02_plag_howtodesigncrudform
    THE SECTION
    How To: Design Data Maintenance Forms to Support Create, Read, Update, and Delete Operations

    i found this article very good my objective is design the data access layer with application block
    The article is very nice but i have some problem ..

    Idont know what is the problem

    LAYER BUSINESS ENTITY
    ----------------------------------

    i have a dataset typed CustomerDS


    LAYER DATA ACCESS
    -----------------------------------------------------

    Public Function GetById(ByVal customerId As Integer) As CustomerDS.Customer * I HAVE ERROR ONLY I CAN PUT customerDataTable AND CustomerDS.customerDataRow
    Try
    Dim customer As New CustomerDS

    ' Execute the "select single entity" stored procedure
    Dim reader As SqlDataReader = SqlHelper.ExecuteReader(Me.connectionStr, "Customer_SelectByID", customerId)
    Try
    ' Populate the dataset with reader rows
    SQLHelperExtension.Fill(reader, customer, customer.Customers.TableName, 0, 1)
    *THE SQLHELPEREXTENSION I HAVE ERROR WITH THIS
    Finally
    reader.Dispose()
    End Try

    ' Return the first row
    Return customer.Customers(0)
    Catch e As SqlException

    End Try
    COMO DEVUELVO EL DATASET CON LA TABLA CUSTOMER

    LAYER BUSINESS LOGIC
    ----------------------------------

    ' Return the customer with the specified ID
    Public Function GetById(ByVal customerId As Integer) As CustomerDS.Customer * I HAVE ERROR IS NOT DEFINED
    ' Create the DALC component
    Dim customerDalc As New CustomerDalc

    ' Get the specified customer using the DALC component
    Return customerDalc.GetById(customerId)
    End Function 'GetById


    IN MY PAGE ASPX
    ------------
    ' Create a "customer" business component
    Dim customerBc As New CustomerBc()

    ' Get the specified customer's details from the data store
    Dim customer As CustomerDs.Customer = customerBc.GetById(CInt(ViewState("CustomerId"))) *******I HAVE ERROR CustomerDS.Customer

    ' Populate the form controls with customer details
    txtCompany.Text = customer.CompanyName
    txtContact.Text = customer.ContactName



    i dont understan why i dont have CustomerDS.Customer
  • Re: problem with daab and pasing dataset in application tier

    09-18-2006, 3:53 AM
    You should check your namespace reference is right or not.Your class access is public or not. 
Page 1 of 1 (2 items)
Microsoft Communities