ASP ADO MS Access database links

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Fary4u
    Contributor
    • Jul 2007
    • 273

    ASP ADO MS Access database links

    Hi

    i'm trying to make one file with dropdown list from Product table where all products

    like fashion category
    1- Jeans
    2- Tops
    3- Shoes

    But only problem is i need to take values from MS Access table where each product has different value like

    1- Jeans ( Style - Bootfit... / Size - 32... / Color - Black... )
    2- Tops ( Style - V Nick... / Size - Medium... / Color - Green )
    3- Shoes ( Style - Laces... / Size - 9"... / Color - Brown )

    if any body know any example or any thing which can help me i'm b really great full

    _______________ _______________ _______________ _____

    i think so these all value store are different to each other so it's stored into database as different table & need if condition to access from the database.

    if there is any question feel free to send me email

    Regards
    <send me a pm>
  • jhardman
    Recognized Expert Specialist
    • Jan 2007
    • 3405

    #2
    I don't understand how your db table is set up. Could you elaborate? What are the field names and what are the values in typical records?

    Jared

    Comment

    • Fary4u
      Contributor
      • Jul 2007
      • 273

      #3
      Hi thank for you replay

      it's very difficult to explain hope fully following link can explain every thing, overall functionality is something like this but i'm using asp to handle this, coz i'm developing front-end as well as back-end





      If any suggestion or any helpful example please send me a PM

      Best Regards
      Farhan

      Comment

      • jhardman
        Recognized Expert Specialist
        • Jan 2007
        • 3405

        #4
        Farhan,

        I think it's going to be easiest if you compile the different lists separately in arrays or some such and then print the page, as your db is set up, I don't see an easy way to connect to it and get all of the info at once.

        It makes sense to me to organize the db differently. You might want to think of just using one style table and one size table, rather than having different tables specific for different product types. This would make the connection simpler and still keep people from trying to enter a pants size for a top. Say you added a field in style and size tables that refer to the category, like this:
        Code:
        Size_ID_____Name______category
        1___________Small______tops
        You should also consider putting just the ID number in the products size, color, category, and style fields (like where I put "tops" above, it should probably say "2"). This allows for best control.

        Now, if I understand you right, you want to allow someone to first select a type of clothing then select a style, a size, a color, and get the price? or do you want to give a big table with all of the products? If you just want to make a big table, then you can connect like this:[code=asp]query = "SELECT * FROM categories, styles, sizes, colors, products"
        query = query & " WHERE products.catego ry = category_ID"
        query = query & " AND products.color = color_ID"
        query = query & " AND products.style = style_ID"
        query = query & " AND products.size = size_ID"[/code]Does this point you where you want to go?

        Jared

        Comment

        • Fary4u
          Contributor
          • Jul 2007
          • 273

          #5
          Hi thanks for you replay

          is any possiblity to give me some example using ADO Database Links but just give need idea how to over come this problem using ASP Page for dropdown list of product filed ( Colos / Size ) Etc . . .

          i've done this but does not working properly

          ' get sizes
          sSQL = "select * from colours,product _colours where colours.id = color_id and prod_id='" & sID & "'"
          set rsColours = Server.CreateOb ject("ADODB.Rec ordSet")
          rsColours.open sSQL, sConn,adOpenKey set,adLockReadO nly

          ' get styles
          sSQL = "select * from styles,product_ styles where styles.id = style_id and prod_id='" & sID & "'"
          set rsStyles = Server.CreateOb ject("ADODB.Rec ordSet")
          rsStyles.open sSQL, sConn,adOpenKey set,adLockReadO nly
          %>


          Regards
          Farhan

          Comment

          • jhardman
            Recognized Expert Specialist
            • Jan 2007
            • 3405

            #6
            Fahran,

            This looks good. What exactly is the problem it is giving you? prod_id might need to be a number, in which case it should not be in quotes:
            Code:
            ...WHERE styles.id = style_id AND prod_id=" & sID
            Jared

            Comment

            • Fary4u
              Contributor
              • Jul 2007
              • 273

              #7
              Thx

              Yep you absolute rite.
              can you give me replay with my email

              please take a look my website www.insidevisio n.co.uk

              Regards
              Farhan

              Comment

              Working...