Professional Web Applications Themes

ASP ecommerce help - ASP Database

Hi All I seem to be getting to grips with the whole ASP DB ecommerce thing, but there are certain aspects that my knowledge is really thin. If poss, could you please advise or point me in the right direction re the below: 1) I use the getrows feature all the time now for recordsets rather than doing a DO ... LOOP recurse of the records. At present this works great with the data I'm working with, but is there a possibility that a getrows call can hog resources to the point of the collapse where a DO .. LOOP ...

  1. #1

    Default ASP ecommerce help

    Hi All

    I seem to be getting to grips with the whole ASP DB ecommerce thing, but
    there are certain aspects that my knowledge is really thin. If poss, could
    you please advise or point me in the right direction re the below:

    1) I use the getrows feature all the time now for recordsets rather than
    doing a DO ... LOOP recurse of the records.

    At present this works great with the data I'm working with, but is there a
    possibility that a getrows call can hog resources to the point of the
    collapse where a DO .. LOOP recurse will never cause this?

    I'm not dealing with thousands of recs/rows, but I'd like to know if it is
    the norm for devs to use the getrows over the old recurse.

    2) Because I'm checking a cookie on every page of my site, I believe I have
    to use the Response.Buffer = true on each page (right??). This seems to be
    fine if my server isn't being hogged, but middle of the day and evening
    traffic means that as there is a lot of ASP work to be done on my pages then
    the Response.Buffer command can sometimes cause timeouts on my pages. Do I
    have to use this command when using cookies and if so, whats the best way to
    eliminate the timeout issue? I know this is pretty generic question, but I
    want to get a feel for how you tackle this.

    3) My final question may be more addressed to UK users as it deals with the
    aspect of processing orders once they have been received on the secure
    server. At the moment, the details are entered via a https page and stored
    in a MySQL db, a notification email is sent to the merchant (no ccard
    details sent), the merchant retrieves the order from the MySQL db via a
    hidden https page, prints the order, processes it on their pdq and then
    confirms that the order has been placed. This confirmation obliterates most
    of the credit card details in the MySQL DB so that they cannot be retrieved
    again.

    I know WorldPay and SecureTrading offer a straight to the bank service, but
    sometimes the goods might not be able to shipped so the merchant can be
    constantly losing out if they have to credit a transaction whereby these
    companies still take a % of the original inv and then the credit.

    Can somebody advise me or point me in the direction of a forum/newsboard
    where like-minded devs are doing this day-in day-out.

    Thanks

    Laphan


    Laphan Guest

  2. #2

    Default Re: ASP ecommerce help

    Laphan wrote: 

    No. Why do you have this doubt? Why do you think using DO...LOOP would use
    fewer resources than GetRows?
     

    It's my normal technique.
     

    Why? I don't recall buffering having anything to do with checking cookies.
     

    When? Do you have a repro of a situation where a timeout will occur when
    using buffering that will not occur when not using buffering?
     

    I don't do ecommerce, but I don't remember ever deliberately turning
    buffering off.

    Bob Barrows

    --
    Microsoft MVP - ASP/ASP.NET
    Please reply to the newsgroup. This email account is my spam trap so I
    don't check it very often. If you must reply off-line, then remove the
    "NO SPAM"


    Bob Guest

  3. #3

    Default Re: ASP ecommerce help

    > 3) My final question may be more addressed to UK users as it deals with 

    we use an order status and use the database instead of a cookie to save a
    cart, in this way you get better basket statistics so the shop owner can see
    what items are added to the basket but never bought. it also helps if theres
    a problem because you can backtrack the basket items to find out where the
    system failed. mort thinngs you can do with this is an order processing
    report for a shopper so they can see that the cc has been processed ready
    for dispatch (we also have an "item sent" flag). you also get a running
    total of all sales etc and other reports which is usefull stuff for when you
    need to re-develop the system.

     

    try www.protx.com if you do under 1000 sales a quarter its only 20 per
    month flat fee with over this amount being only 10p per transaction, no
    setup fees, no other monthly charges.
     

    mark


    mark Guest

  4. #4

    Default Re: ASP ecommerce help

    On Sat, 4 Sep 2004 14:32:30 +0100, "Laphan" <co.uk>
    wrote:
     

    Doesn't make much sense, GetRows consumes fewer resources, depending
    on what you actually are coding inot your loop.
     

    Norm is to use the process appropriate to the task at hand. Which may
    mena either one.
     

    Best is not to use cookies. :)
     

    You're still storing credit card data, whether for short time or
    longer really isn't factor.
     

    Those are the choices to make in eCommerce.
     

    How about simply using a commercial canned product to do this? One
    that's proven over time and secure?

    Jeff
    Jeff Guest

  5. #5

    Default Re: ASP ecommerce help

    "Laphan" wrote in message news:4139c285$0.0.1...
    : 2) Because I'm checking a cookie on every page of my site, I believe I
    have
    : to use the Response.Buffer = true on each page (right??).

    No, it is not required. However, if you want to put the cookie anywhere on
    your page then Response.Buffer = True is required.
    http://www.powerasp.com/content/code-snippets/cookies.asp

    This seems to be
    : fine if my server isn't being hogged, but middle of the day and evening
    : traffic means that as there is a lot of ASP work to be done on my pages
    then
    : the Response.Buffer command can sometimes cause timeouts on my pages. Do
    I
    : have to use this command when using cookies and if so, whats the best way
    to
    : eliminate the timeout issue? I know this is pretty generic question, but
    I
    : want to get a feel for how you tackle this.

    Response.Buffer shouldn't cause timeouts. Define 'a lot of ASP work'.

    --
    Roland Hall
    /* This information is distributed in the hope that it will be useful, but
    without any warranty; without even the implied warranty of merchantability
    or fitness for a particular purpose. */
    Technet Script Center - http://www.microsoft.com/technet/scriptcenter/
    WSH 5.6 Doentation - http://msdn.microsoft.com/downloads/list/webdev.asp
    MSDN Library - http://msdn.microsoft.com/library/default.asp


    Roland Guest

  6. #6

    Default Re: ASP ecommerce help

    On Sat, 4 Sep 2004 14:32:30 +0100, "Laphan" <co.uk>
    wrote:
     


    I always use getRows() and store all the info into an array, if your
    using JScript I have a nice little function to help converting VB
    arrays to JScript arrays. (I found it somewhere on the web.)

    /*
    * This function to saftly convert a VBscript array into a
    * JS 1 Dimension array a VBscript array will normally be
    * returned when using the ADO "Recordset.GetRows()" method,
    * it adds 2 custom properties to the Jscript Array called "rows" &
    * "cols" if no array is return from the RS.GetRows() method
    * (eg a DBerror) then it will return a "string" which this JS
    * function detects and returns an array with nothing in it so
    * you can check if arrayname.length >0 before using it.
    */
    function VB_JSarray(aVBArrayFromDB_GetRows, displayDebugInfo) {
    if (typeof aVBArrayFromDB_GetRows != 'string') {
    vbRowsArray = new VBArray(aVBArrayFromDB_GetRows);
    var numberOfColumns = vbRowsArray.ubound(1) + 1;
    var numberOfRows = vbRowsArray.ubound(2) + 1;
    var rowsArray = vbRowsArray.toArray();
    rowsArray.rows = numberOfRows;
    rowsArray.cols = numberOfColumns;
    if (displayDebugInfo) {

    debugOut('{HEAD}VB_JSarray()','Rows='+rowsArray.ro ws,'Columns='+rowsArray.cols,'rowsArray='+rowsArra y);
    }
    } else {
    var rowsArray = Array();
    rowsArray.rows = 0;
    rowsArray.cols = 0;
    }
    return rowsArray;
    }


    To use.

    // CONSTANTS for each field returnd in the recordset.
    var COL1=0;
    var COL2=1;
    var COL3=2;

    aMyRSArray = VB_JSarray(oDB.getRows());
    if (aMyRSArray.length >0) {
    for (var i=0; i<aMyRSArray.length; i+=aMyRSArray.cols) {
    out('<br>'+aMyRSArray[i+COL1]);
    out('<br>'+aMyRSArray[i+COL2]);
    out('<br>'+aMyRSArray[i+COL3]);
    }
    } else {
    out("<p>No records found</p>");
    }


    function out(sText) {
    Response.Write (sText);
    if (inDebugMode()) {
    Response.Write ('\r\n');
    }
    }

     



    Have you tried increasing the timeout limit at the top of the page?

    Server.ScriptTimeout = NumOfSeconds


    HTH

    Al.

     

    Sorry never done any ecommerce.
     

    Harag Guest

  7. #7

    Default Re: ASP ecommerce help


    Roland Hall <nobodynowhere> wrote in message
    news:phx.gbl...
    "Laphan" wrote in message news:4139c285$0.0.1...
    : 2) Because I'm checking a cookie on every page of my site, I believe I
    have
    : to use the Response.Buffer = true on each page (right??).

    No, it is not required. However, if you want to put the cookie anywhere on
    your page then Response.Buffer = True is required.
    http://www.powerasp.com/content/code-snippets/cookies.asp

    This seems to be
    : fine if my server isn't being hogged, but middle of the day and evening
    : traffic means that as there is a lot of ASP work to be done on my pages
    then
    : the Response.Buffer command can sometimes cause timeouts on my pages. Do
    I
    : have to use this command when using cookies and if so, whats the best way
    to
    : eliminate the timeout issue? I know this is pretty generic question, but
    I
    : want to get a feel for how you tackle this.

    Response.Buffer shouldn't cause timeouts. Define 'a lot of ASP work'.

    --
    Roland Hall
    /* This information is distributed in the hope that it will be useful, but
    without any warranty; without even the implied warranty of merchantability
    or fitness for a particular purpose. */
    Technet Script Center - http://www.microsoft.com/technet/scriptcenter/
    WSH 5.6 Doentation - http://msdn.microsoft.com/downloads/list/webdev.asp
    MSDN Library - http://msdn.microsoft.com/library/default.asp


    Hi Guys

    Thanks for the feedback.

    With regard to mark's valued comments, I store most of the basket work in
    the db, but in order for me to keep a track of whether the user is still
    there (especially when moving between a secure site and a non-secure site
    which are on different domains) is really hard without sessions and cookies.
    In fact this part of my site brought me to tears trying to figure it out.

    Rgds

    Laphan





    Laphan Guest

  8. #8

    Default Re: ASP ecommerce help

    "Laphan" wrote in message news:413e05ce$0.0.1...
    :
    : Roland Hall <nobodynowhere> wrote in message
    : news:phx.gbl...
    : "Laphan" wrote in message news:4139c285$0.0.1...
    :: 2) Because I'm checking a cookie on every page of my site, I believe I
    : have
    :: to use the Response.Buffer = true on each page (right??).
    :
    : No, it is not required. However, if you want to put the cookie anywhere
    on
    : your page then Response.Buffer = True is required.
    : http://www.powerasp.com/content/code-snippets/cookies.asp
    :
    : This seems to be
    :: fine if my server isn't being hogged, but middle of the day and evening
    :: traffic means that as there is a lot of ASP work to be done on my pages
    : then
    :: the Response.Buffer command can sometimes cause timeouts on my pages. Do
    : I
    :: have to use this command when using cookies and if so, whats the best way
    : to
    :: eliminate the timeout issue? I know this is pretty generic question, but
    : I
    :: want to get a feel for how you tackle this.
    :
    : Response.Buffer shouldn't cause timeouts. Define 'a lot of ASP work'.
    :
    : --
    : Roland Hall
    : /* This information is distributed in the hope that it will be useful, but
    : without any warranty; without even the implied warranty of merchantability
    : or fitness for a particular purpose. */
    : Technet Script Center - http://www.microsoft.com/technet/scriptcenter/
    : WSH 5.6 Doentation -
    http://msdn.microsoft.com/downloads/list/webdev.asp
    : MSDN Library - http://msdn.microsoft.com/library/default.asp
    :
    :
    : Hi Guys
    :
    : Thanks for the feedback.
    :
    : With regard to mark's valued comments, I store most of the basket work in
    : the db, but in order for me to keep a track of whether the user is still
    : there (especially when moving between a secure site and a non-secure site
    : which are on different domains) is really hard without sessions and
    cookies.
    : In fact this part of my site brought me to tears trying to figure it out.
    :
    I'm using cookies to track the user.

    --
    Roland Hall
    /* This information is distributed in the hope that it will be useful, but
    without any warranty; without even the implied warranty of merchantability
    or fitness for a particular purpose. */
    Technet Script Center - http://www.microsoft.com/technet/scriptcenter/
    WSH 5.6 Doentation - http://msdn.microsoft.com/downloads/list/webdev.asp
    MSDN Library - http://msdn.microsoft.com/library/default.asp


    Roland Guest

Similar Threads

  1. eCommerce eXentions
    By Thirion in forum Macromedia Exchange Dreamweaver Extensions
    Replies: 0
    Last Post: March 2nd, 05:27 PM
  2. looking for ecommerce app
    By jdgrubb in forum Macromedia Dynamic HTML
    Replies: 1
    Last Post: January 5th, 03:44 PM
  3. CF ecommerce host ?
    By Furious in forum Macromedia ColdFusion
    Replies: 1
    Last Post: March 16th, 07:26 PM
  4. [PHP] Novice in eCommerce
    By Karen Lubrecht in forum PHP Development
    Replies: 0
    Last Post: September 16th, 02:30 PM
  5. paypal and ecommerce
    By Ralph Guzman in forum PHP Development
    Replies: 3
    Last Post: July 18th, 07:40 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not 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