locked
Access database HELP!!! RRS feed

  • Question

  • User-1489375005 posted

    I have an access database called service.mdb with two tables:  Services & Service Category.  I know how to insert the AccessDataSource into the page but I'm not quite sure how to have it populate the data.  I want it to first pull a service category and then populate all the services that fall into the category.  I need it to do this until it reaches the end of the Service Category list.

     Thanks.

    Wednesday, October 8, 2008 8:18 PM

Answers

  • User2141697585 posted

    Hopefully my understanding is tally to your doubt

    1) u need to link btw Service and Services

    when retrieving the data, first link them

    strSQL =

    "SELECT SCat.Service_ID, S.Services_Name

    FROM ServiceCategory SCat, Services S

    WHERE SCat.Service_ID = S.Service_ID

    AND SCat.Service_ID = " & txtService_ID

    2) apply cmd.ExecuteReader

    cmd.ExecuteReader()
            While rdr.Read()

             ---retrieve them here

            End While

    Cheers!

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, October 8, 2008 10:55 PM