Results 1 to 4 of 4

Thread: Copying records from table to a table

  1. #1
    Stan Lobunets Guest

    Copying records from table to a table

    I need to able to select a record from the grid mode by clicking on it, and copy it to an identical but blank table. Is this possible? The ultimate goal is to be able to create a simple report based on several records. Is there anyway to parse through the records that a filter screen returned, put certain record fields maybe into an array, and then do calculations on them? Thanks.

  2. #2
    John Guest

    Copying records from table to a table (reply)

    Hi Stan,

    You ask two different questions:

    1) Can you make it so that when you click on a record, you store the results in a "new" record?

    2) Can you take the results of a filter and store them in an array, etc.?

    Neither of these techniques is supported by any methods or properties in
    ASP-db. The first one could be done by using the dbMagicCell property and
    simply making a long <A HREF> that passes all the fields to another program
    on the URL, i.e.:

    MyDb.dbMagicCell=&#34;field1,,<A HREF=file2.asp?f1=#field1#&f2=#field2#>Go</A>&#34;

    When the user clicks on the &#34;GO&#34; hyperlink, it will launch file2.asp and pass
    it the values of field1 and two, etc. on the URL. You retrieve them with:

    myf1 = Request(&#34;f1&#34: myf2 = Request(&#34;f2&#34 ...

    That gets the data, now it&#39;s up to you to put it into an array or whatever
    and work with it.

    You could even have the &#34;file2.asp&#34; program run in another frame (even an
    invisible one if you wish), and that way, the first table could remain on the
    screen allowing the user to click on each record and &#34;select&#34; it for you to
    store.

    The second question you asked can only be done in JavaScript, and it&#39;s not
    that easy. We&#39;ve been asked this kind of question before, but the problem
    is always the same... How can we allocate enough storage to hold what could
    potentially be thousands of records with hundreds of fields? What if there&#39;s
    huge text fields (memo fields) in there? It gets really messy when you try
    and make something like this work for all cases.

    Let us know if the solution proposed above will meet your needs.

    Thanks!

    John

    On 11/16/98 12:15:06 PM, Stan Lobunets wrote:
    > I need to able to select a record from the grid mode by clicking on it, and
    > copy it to an identical but blank table. Is this possible? The ultimate
    > goal is to be able to create a simple report based on several records. Is
    > there anyway to parse through the records that a filter screen returned,
    > put certain record fields maybe into an array, and then do calculations on
    > them? Thanks.

  3. #3
    Stan Lobunets Guest

    RE: Copying records from table to a table (reply)

    Jon,

    Thanks for you suggestions. What you said below might work, I just need to clarify something. Here&#39;s a typical scenario for my application. It starts with a search form. Once you get the results grid, the user should be able to hand-pick specific records to be added to the report. The report is very simple math, but the web implementation might prove more difficult. It&#39;s just a lot of averaging and summation... What I don&#39;t understand is how you populate a the array. I know it&#39;s an ASPdb issue, but I need to figure out the transition from ASPdb result grid to my report. Preferably, I would have a check box next to each record, and with one button pass the checked records to &#39;file2.asp&#39; that would do the calculation.

    On 11/19/98 1:10:02 AM, John wrote:

    >2) Can you take the results of a filter and store them in an
    > array, etc.?

    >Neither of these techniques is supported by any methods or
    > properties in
    >ASP-db. The first one could be done by using the
    > dbMagicCell property and
    >simply making a long <A HREF> that passes all
    > the fields to another program
    >on the URL, i.e.:

    > MyDb.dbMagicCell=&#34;field1,,<A
    > HREF=file2.asp?f1=#field1#&f2=#field2#>Go</A>&#34;

    >When the user clicks
    > on the &#34;GO&#34; hyperlink, it will launch file2.asp and pass
    >it the
    > values of field1 and two, etc. on the URL. You retrieve them with:


    > myf1 = Request(&#34;f1&#34: myf2 = Request(&#34;f2&#34 ...

    >That gets
    > the data, now it&#39;s up to you to put it into an array or whatever
    >and
    > work with it.

    >You could even have the &#34;file2.asp&#34; program run in
    > another frame (even an
    >invisible one if you wish), and that way, the first
    > table could remain on the
    >screen allowing the user to click on each record
    > and &#34;select&#34; it for you to
    >store.


  4. #4
    John Guest

    RE: Copying records from table to a table (reply)

    Hi Stan,

    Check out the little shopping cart example I put together at:

    www.aspdb.com/shoppingcart.asp

    The source is at:

    www.aspdb.com/shoppingcart.txt (click View Source if using IE).

    It may be just what the doctor ordered!

    John


    On 11/23/98 10:25:31 AM, Stan Lobunets wrote:
    > Jon,

    Thanks for you suggestions. What you said below might work, I just
    > need to clarify something. Here&#39;s a typical scenario for my
    > application. It starts with a search form. Once you get the results grid,
    > the user should be able to hand-pick specific records to be added to the
    > report. The report is very simple math, but the web implementation might
    > prove more difficult. It&#39;s just a lot of averaging and summation...
    > What I don&#39;t understand is how you populate a the array. I know
    > it&#39;s an ASPdb issue, but I need to figure out the transition from ASPdb
    > result grid to my report. Preferably, I would have a check box next to
    > each record, and with one button pass the checked records to
    > &#39;file2.asp&#39; that would do the calculation.

    On 11/19/98 1:10:02
    > AM, John wrote:

    >2) Can you take the results of a filter and store them
    > in an
    > array, etc.?

    >Neither of these techniques is supported by any
    > methods or
    > properties in
    >ASP-db. The first one could be done by
    > using the
    > dbMagicCell property and
    >simply making a long <A HREF>
    > that passes all
    > the fields to another program
    >on the URL, i.e.:

    >
    > MyDb.dbMagicCell=&#34;field1,,<A
    >
    > HREF=file2.asp?f1=#field1#&f2=#field2#>Go</A>&#34;

    >When the user clicks
    >
    > on the &#34;GO&#34; hyperlink, it will launch file2.asp and pass
    >it
    > the
    > values of field1 and two, etc. on the URL. You retrieve them
    > with:


    > myf1 = Request(&#34;f1&#34: myf2 = Request(&#34;f2&#34
    > ...

    >That gets
    > the data, now it&#39;s up to you to put it into an
    > array or whatever
    >and
    > work with it.

    >You could even have the
    > &#34;file2.asp&#34; program run in
    > another frame (even an
    >invisible
    > one if you wish), and that way, the first
    > table could remain on
    > the
    >screen allowing the user to click on each record
    > and
    > &#34;select&#34; it for you to
    >store.


Posting Permissions

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