asp web page problem, two recordsets

Ask a Question related to ASP, Design and Development.

  1. #1

    Default Re: asp web page problem, two recordsets

    oh, ok

    Thanks, i just thought it would be a bit sloppy to paste a whole page of
    code, so i am trying to create a page, and then paste the code in them
    publish it.
    do you know how i can paste code, so it looks on the web page as it would in
    the source code (text file)


    Raphael Gluck Guest

  2. Similar Questions and Discussions

    1. ASP Recordsets
      Hi there, i'm developing an ASP SQL application, and was just wondering whether for some reason this limited me to one recordset per page. the...
    2. Problem filtering Data through Multiple Recordsets
      Hello, I am currently working on a profile page that users will go to once they log in to our website. The profile page will show the users contact...
    3. Persisted XML Recordsets - Disconnected Recordsets - problems
      I have a recordset, client side .ASP that I save as a DOM. I pass to a server side .ASP to reconnect the recordset and update. I keep getting an...
    4. Paging recordsets.
      Hi All win 2k sp4 sql 2k sp3 asp vbscript iis5 I was looking at the ASPfaq(id 2120) the other week and it said that paging recordsets for...
    5. HELP! Recordsets problem with IIS 6.0
      I have a problem. When I had IIS 5.1 my Dreamweaver MX created ADODB.Recordset objects for my ASP pages. Everything worked great. But now it causes...
  3. #2

    Default Re: asp web page problem, two recordsets

    sorry for being so sloppy today

    Here's what i am trying to do, I have website, with a database,
    on each page, i have a different table displaying, and i link one page to
    another, using foreign keys in the databases.
    Now for the two pages in question, i want the user who clicks on a product
    in product.asp to then be taken to listing.asp but then i want to choices,
    if he clicks on a certain product in product.asp he will see the resulting
    listing.asp as containing the first recordset. whereas if there is something
    exrta in the product he requested, he will see the second recordset.
    I am using a file called utlilty.inc and i am trying to include this in the
    lisitng.asp page

    [url]http://www.tripakltd.com/aspbeta/utility.txt[/url]

    I guess there are a thousand ways to go about this, and many will be
    correct. someone was trying to help me with this, but i need to help myself
    now, i have been using dreamweaver MX so far, and dont hand code, so i am
    pretty stuck,
    Any more info, please, please ask

    many many thanks

    Raphael


    Raphael Gluck Guest

  4. #3

    Default Re: asp web page problem, two recordsets

    Just as a quick aside, don't use the extension .inc for include files. If
    there was an error in your include, then everyone would see the filename in
    the error message, and could view it as a plain text file in their browser
    (including possibly all your database connections and database login
    details).

    Always use the .asp extension. Then even if they do ever see your include
    filename mentioned in an error, it will be parsed when they try to open it
    and they will see nothing.

    A Ratcliffe
    [email]aratcliffe@archimagic.net[/email]


    "Raphael Gluck" <raphaelgluck@bezeqint.net> wrote in message
    news:esV$yZBWDHA.1928@TK2MSFTNGP12.phx.gbl...
    > sorry for being so sloppy today
    >
    > Here's what i am trying to do, I have website, with a database,
    > on each page, i have a different table displaying, and i link one page to
    > another, using foreign keys in the databases.
    > Now for the two pages in question, i want the user who clicks on a product
    > in product.asp to then be taken to listing.asp but then i want to choices,
    > if he clicks on a certain product in product.asp he will see the resulting
    > listing.asp as containing the first recordset. whereas if there is
    something
    > exrta in the product he requested, he will see the second recordset.
    > I am using a file called utlilty.inc and i am trying to include this in
    the
    > lisitng.asp page
    >
    > [url]http://www.tripakltd.com/aspbeta/utility.txt[/url]
    >
    > I guess there are a thousand ways to go about this, and many will be
    > correct. someone was trying to help me with this, but i need to help
    myself
    > now, i have been using dreamweaver MX so far, and dont hand code, so i am
    > pretty stuck,
    > Any more info, please, please ask
    >
    > many many thanks
    >
    > Raphael
    >
    >

    A Ratcliffe Guest

  5. #4

    Default Re: asp web page problem, two recordsets

    oh, thanks for that.
    The person who was helping me, was more a Database person, and less of a
    web design person, that is why i am stuck

    Thanks


    Raphael Gluck Guest

  6. #5

    Default Re: asp web page problem, two recordsets

    Without studying the code in depth, mainly because there are other coding
    suggestions to be made about it in addition to solving your problem....

    Am I right in assuming that on page A you list all your products
    (filtered/limited/sorted in some way if required), and then when they click
    on a product in the list, Page B is the Product details, with an extra
    description/notes field if one exists?

    A Ratcliffe
    [email]aratcliffe@archimagic.net[/email]

    "Raphael Gluck" <raphaelgluck@bezeqint.net> wrote in message
    news:uBquLhBWDHA.1872@TK2MSFTNGP12.phx.gbl...
    > oh, thanks for that.
    > The person who was helping me, was more a Database person, and less of a
    > web design person, that is why i am stuck
    >
    > Thanks
    >
    >

    A Ratcliffe Guest

  7. #6

    Default Re: asp web page problem, two recordsets

    yes, well i only displayed the pages i have in question.
    Page A, is page A now, but when i publish Page A is really the third page,
    It's just my index.asp and second page class.asp both work well. so no probs
    there
    Basically i will have
    index.asp
    class.asp
    product.asp
    listing.asp

    Now sometimes there is a fifth page, so when someone clicks on something in
    product.asp if there is a fifth page, he see's the info leading to that, on
    listing.asp whereas if there is no fifth page, then lisitng.asp is the final
    destination, therefore a different recordset displays

    Thanks

    Raphael


    Raphael Gluck Guest

  8. #7

    Default Re: asp web page problem, two recordsets

    Actually, I think I've understood it backwards.

    Do I assume that all products have certain information that is the same, but
    depending on the type of product, there is additional information that can
    be displayed - specific to that type of product?

    If I'm still not understanding, could you give a real-world example?

    A Ratcliffe
    [email]aratcliffe@archimagic.net[/email]

    "A Ratcliffe" <aratcliffe@archimagic.net> wrote in message
    news:%23dwucnBWDHA.3220@tk2msftngp13.phx.gbl...
    > Without studying the code in depth, mainly because there are other coding
    > suggestions to be made about it in addition to solving your problem....
    >
    > Am I right in assuming that on page A you list all your products
    > (filtered/limited/sorted in some way if required), and then when they
    click
    > on a product in the list, Page B is the Product details, with an extra
    > description/notes field if one exists?
    >
    > A Ratcliffe
    > [email]aratcliffe@archimagic.net[/email]
    >
    > "Raphael Gluck" <raphaelgluck@bezeqint.net> wrote in message
    > news:uBquLhBWDHA.1872@TK2MSFTNGP12.phx.gbl...
    > > oh, thanks for that.
    > > The person who was helping me, was more a Database person, and less of
    a
    > > web design person, that is why i am stuck
    > >
    > > Thanks
    > >
    > >
    >
    >

    A Ratcliffe Guest

  9. #8

    Default Re: asp web page problem, two recordsets

    sure, no big secret! here goes

    I am building a web site for Packaging materials, Tapes, cartons, strapping
    etcc...

    So on my first page, i will have a recordset displaying all the above.
    If a user clicks adhesive tapes (picture and text) he will then go from
    index.asp to class.asp
    on class.asp there are various kinds of tape, Adhesive tape, Barrier tape,
    Tape dispensers etc..
    class.asp links to product.asp, if you clicked adheshive tape, you will see,
    coloured packaging tape, standard packaging tape, double sided tape etc.....

    now here is the tricky bit, normally product.asp becomes listing.asp so if
    you choose coloured packaging tape, you will see the product, with
    information about it, plus a graphic, and then all the sizes.

    Now when i was creating the index catgegory of boxes, I realised that when I
    get to listing, there are two many of one standard box size, too many sizes
    for one page, so i have another page, and then i can split up my box sizes,
    into groups. so instead of tape, and seeing all the sizes (about 10 or so on
    average)
    with cartons i dont want that, i want the user to see "between 200 and 300mm
    " and "between 300 and 400 mm" etc.. and only once they've clicked on that
    do they see the relevant sizes, in that category

    Does that make sense?

    Thanks so much for helping

    Raphael


    Raphael Gluck Guest

  10. #9

    Default Re: asp web page problem, two recordsets

    OK, Raphael...

    Firstly, it would be of great benefit to you in so many way if you started
    to learn the basics of hand-coding. Applications like Dreamweaver, can be
    useful for some things, but they all tend to inject so much crap into your
    code. This has two effects: your website will suffer (accessibility, browser
    support and performance), and it's much harder for the likes of us to
    de-cypher. Also, when you look at the code, it's a lot harder for you to
    distinguish the important parts of the code, and thus harder to learn.

    Secondly, it is very unlikely you will be able develop anything too complex
    with Dreamweaver with understanding more about what is going on. Plenty of
    people build quality applications using MX, but they usually know most of
    what goes on behind the scenes, and they are just using MX to help them on
    their way.

    I haven't gone through your code. It's a bit of a nightmare! However, I can
    hopefully point you in the right direction...

    On the first page, you will have a table including a link field per row:

    <a href="listing.asp?Item_Id=<%=rsProduct.Fields("Ite m_ID")%>">Product 1</a>

    This will take you to the listing page, where you can identify the ID from
    the querystring:

    Dim ID
    ID = Request.QueryString("Item_Id")

    You seem to indicate that if the 'extra' information is available, you want
    to show that information. If not, you want to show the default information.
    Is this correct?

    If this is the case, you can try the following:

    Dim sSQL, rsListing, oConn, sConn

    'set SQL query and connection string
    sSQL = "Select HasTextSpec from tblProductGroup where Item_ID = '" & ID &
    "'"
    sConn = 'set your connection string here - note ALWAYS use the same
    connection string - this enables connection pooling

    'create the DB Connection
    Set oConn = Server.CreateObject("ADODB.Connection")
    oConn.Open sConn

    'retrieve the data, if any
    Set rsListing = oConn.Execute sSQL

    If Not rsListing.EOF Then
    'There is some extra info for this product, therefore show this
    information
    sSQL = "SELECT tblTexSpec.Item_ID, tblTexSpec.TexSpecID,
    tblTexSpec.Text_Spec FROM tblTexSpec"

    Set rsListing = oConn.Execute sSQL
    'etc...
    Else
    'there isnt any extra info therefore, re-query for the standard
    information
    sSQL = "SELECT tblProductGroup.*, etc....."

    Set rsListing = oConn.Execute sSQL
    'etc.....
    End if

    'Close all objects
    Set oConn = Nothing
    Set rsListing = Nothing




    I'm not entirely sure if I've understood your intentions correctly, and I
    know given a bit more information and time I could come up with a much
    improved solution, but to be honest, I think you need to get to grips with
    some of the basics of ASP first (try [url]www.w3schools.com[/url]).

    Hope this takes you a couple of steps nearer though..

    Chris



    "Raphael Gluck" <raphaelgluck@bezeqint.net> wrote in message
    news:esV$yZBWDHA.1928@TK2MSFTNGP12.phx.gbl...
    > sorry for being so sloppy today
    >
    > Here's what i am trying to do, I have website, with a database,
    > on each page, i have a different table displaying, and i link one page to
    > another, using foreign keys in the databases.
    > Now for the two pages in question, i want the user who clicks on a product
    > in product.asp to then be taken to listing.asp but then i want to choices,
    > if he clicks on a certain product in product.asp he will see the resulting
    > listing.asp as containing the first recordset. whereas if there is
    something
    > exrta in the product he requested, he will see the second recordset.
    > I am using a file called utlilty.inc and i am trying to include this in
    the
    > lisitng.asp page
    >
    > [url]http://www.tripakltd.com/aspbeta/utility.txt[/url]
    >
    > I guess there are a thousand ways to go about this, and many will be
    > correct. someone was trying to help me with this, but i need to help
    myself
    > now, i have been using dreamweaver MX so far, and dont hand code, so i am
    > pretty stuck,
    > Any more info, please, please ask
    >
    > many many thanks
    >
    > Raphael
    >
    >

    CJM Guest

  11. #10

    Default Re: asp web page problem, two recordsets

    First of all sorry for that mountain of code, I realise what dreamweaver,
    Frontpage or whatever does to your page, and all the rubbish it inserts

    I have begun learning asp.net (sams teach yourself) but it will be a while
    till i fully grasp that. hopefully by then most web hosts will support
    asp.net, that's why i've chosen to learn that, but am using dreamweaver for
    building asp (3.0 i guess)

    I think you have understood me, and your piece of code that you so kindly
    wrote for me is probably what i need.
    I am just too stupid to be able to modify it, and know where to put it.

    Perhaps you will have a little more time for me, to show me exactly.


    Thanks, for the help

    Raphael


    Raphael Gluck Guest

  12. #11

    Default Re: asp web page problem, two recordsets

    ok, I understand now, I think. Should be easy enough. I'll describe the
    generalised version, then apply it to your packaging. If I've hit the nail
    on the head, I can help ;)

    You have a tree-structure of data, going into more detail at each level. For
    each level of the tree, you can either have the ultimate leaves (items), or
    more branches. (Possible you might have leaves and branches for the same
    level, but we are talking generalised here).

    In specific terms:
    Coloured Tapes(Branch) has only leaves (items)

    but

    Corrugated Card Cartons(Branch) has more branches (10 -> 100 mm, 100+ -> 200
    etc), each of which have their own leaves (items)

    If I've understood, then there are several ways to do it. Partially it will
    depend on how you store the data, and if you want the specific sub-listings
    stored in the database structure of elsewhere.

    Look forward to your reply,

    A Ratcliffe
    [email]aratcliffe@archimagic.net[/email]

    "Raphael Gluck" <raphaelgluck@bezeqint.net> wrote in message
    news:%23XuRgzBWDHA.2212@TK2MSFTNGP12.phx.gbl...
    > sure, no big secret! here goes
    >
    > I am building a web site for Packaging materials, Tapes, cartons,
    strapping
    > etcc...
    >
    > So on my first page, i will have a recordset displaying all the above.
    > If a user clicks adhesive tapes (picture and text) he will then go from
    > index.asp to class.asp
    > on class.asp there are various kinds of tape, Adhesive tape, Barrier tape,
    > Tape dispensers etc..
    > class.asp links to product.asp, if you clicked adheshive tape, you will
    see,
    > coloured packaging tape, standard packaging tape, double sided tape
    etc.....
    >
    > now here is the tricky bit, normally product.asp becomes listing.asp so if
    > you choose coloured packaging tape, you will see the product, with
    > information about it, plus a graphic, and then all the sizes.
    >
    > Now when i was creating the index catgegory of boxes, I realised that when
    I
    > get to listing, there are two many of one standard box size, too many
    sizes
    > for one page, so i have another page, and then i can split up my box
    sizes,
    > into groups. so instead of tape, and seeing all the sizes (about 10 or so
    on
    > average)
    > with cartons i dont want that, i want the user to see "between 200 and
    300mm
    > " and "between 300 and 400 mm" etc.. and only once they've clicked on that
    > do they see the relevant sizes, in that category
    >
    > Does that make sense?
    >
    > Thanks so much for helping
    >
    > Raphael
    >
    >

    A Ratcliffe Guest

  13. #12

    Default Re: asp web page problem, two recordsets

    Spot on!! I think!
    Just one thing, where you say,

    (Possible you might have leaves and branches for the same
    level, but we are talking generalised here).

    Isnt that what you are about to show me? see for tapes, lisitng.asp is a
    leaves page, a final page, but for cartons, it will be a branches page, it
    will have one more page to go.

    But i think you understand

    Thanks for the help in advance.


    Raphael Gluck Guest

  14. #13

    Default Re: asp web page problem, two recordsets

    I was just commenting on the possibility of:-

    Rote
    |
    +Branch 1
    | |
    | +Branch 1A
    | | |
    | | +Branch 1AA
    | | | + etc
    | | +Branch 1AB
    | | +Item 1
    | | +Item 2
    | |
    | +Branch 1B
    |
    +Branch 2
    etc

    Where Branch 1A has both branches and items at the same level. Your
    requirements don't require that (yet) although if we were to create a
    generalised solution to the problem you have, it makes it more flexible.

    A Ratcliffe
    [email]aratcliffe@archimagic.net[/email]

    "Raphael Gluck" <raphaelgluck@bezeqint.net> wrote in message
    news:eRV0pFCWDHA.2360@TK2MSFTNGP10.phx.gbl...
    > Spot on!! I think!
    > Just one thing, where you say,
    >
    > (Possible you might have leaves and branches for the same
    > level, but we are talking generalised here).
    >
    > Isnt that what you are about to show me? see for tapes, lisitng.asp is a
    > leaves page, a final page, but for cartons, it will be a branches page, it
    > will have one more page to go.
    >
    > But i think you understand
    >
    > Thanks for the help in advance.
    >
    >

    A Ratcliffe Guest

  15. #14

    Default Re: asp web page problem, two recordsets

    Spot on!! I think!
    Just one thing, where you say,

    (Possible you might have leaves and branches for the same
    level, but we are talking generalised here).

    Isnt that what you are about to show me? see for tapes, lisitng.asp is a
    leaves page, a final page, but for cartons, it will be a branches page, it
    will have one more page to go.

    But i think you understand

    Thanks for the help in advance.


    Raphael Gluck Guest

  16. #15

    Default Re: asp web page problem, two recordsets

    as you say sir.

    I think that would mean asking your page something, and then returning to
    that very same page, as in a search engine, if i understand you correctly,


    Raphael Gluck Guest

  17. #16

    Default Re: asp web page problem, two recordsets

    just a quick note.

    I have tried to remove a little bit of code, just the part that the person
    in the database field was trying to help me with.
    And i have created the clearly defined second recordset to be displayed.
    I have removed the include the the utility.inc file, as I believe you have
    your own method.

    so if you would prefer this page

    [url]http://www.tripakltd.com/aspbeta/listing1.txt[/url]

    Thanks again so very much

    Raphael


    Raphael Gluck Guest

  18. #17

    Default Re: asp web page problem, two recordsets

    Oh sorry, I thought you were busy so i didnt wish to disturb you

    My database is Access and SQL and my site is ASP and VBscript,

    I was just saying that I tried to tidy up that page, just a little bit and
    have another link

    [url]http://www.tripakltd.com/aspbeta/listing1.txt[/url] as opposed to
    [url]http://www.tripakltd.com/aspbeta/listing.txt[/url]

    Would you like to have a look at my Database? i can zip it up to around
    130kb and I can do the same for my whole site, to around 150kb, (if i remove
    the graphics)

    If so, where should i send it to?

    Thanks

    Raphael


    Raphael Gluck Guest

  19. #18

    Default Re: asp web page problem, two recordsets

    If you are happy to do so, seeing the database would show me the structure
    (make it easier to define the modifications). Don't think I need the full
    site, but if you are happy to send it as well, it might be useful. Just
    e-mail it to the address in my signature.

    A Ratcliffe
    [email]aratcliffe@archimagic.net[/email]

    "Raphael Gluck" <raphaelgluck@bezeqint.net> wrote in message
    news:utGF32CWDHA.2328@TK2MSFTNGP12.phx.gbl...
    > Oh sorry, I thought you were busy so i didnt wish to disturb you
    >
    > My database is Access and SQL and my site is ASP and VBscript,
    >
    > I was just saying that I tried to tidy up that page, just a little bit and
    > have another link
    >
    > [url]http://www.tripakltd.com/aspbeta/listing1.txt[/url] as opposed to
    > [url]http://www.tripakltd.com/aspbeta/listing.txt[/url]
    >
    > Would you like to have a look at my Database? i can zip it up to around
    > 130kb and I can do the same for my whole site, to around 150kb, (if i
    remove
    > the graphics)
    >
    > If so, where should i send it to?
    >
    > Thanks
    >
    > Raphael
    >
    >

    A Ratcliffe Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139