Hi Rob,

I am moving your post to the correct thread !! Hope you don't mind ..

It is very simple, Consider The statment

<%= MD5(LCase(SafeKey & StoreID & Sku))%>

you Can do it Like 
        --------------------------------------------
        <%= MD5(LCase(SafeKey & StoreID & RS("ID")))%>
        --------------------------------------------

But the better way of doing that is 
        ----------------------------------------
        <%
        strSKU = RS("ID")
        %>
        <%= MD5(LCase(SafeKey & StoreID & strSKU))%>
        ----------------------------------------

Of-course I assume the above code is whithin the record traversing loop..
Which Is 

        ----------------------------------------
        WHILE not rs.EOF 
                --- The above code here With Any Other req codes

                rs.MoveNext
        Wend
        ----------------------------------------

 
HTH 

cheers





Hi Kuminda

Have a look at the site

http://design9.lavaflow.co.za


This is the test server for this job.  It uses an application service
provider for the transactions and they now require a whole ton of
encryption.  They have supplied some pages that require that I generate what
they call a digest which consists of a safe key, the store id, retail price
and (what they call sku) which is a unique product id.

The product id is set in the database and all I need to do is associate the
id  as their sku.  

eg the coding on the buy button is:
<a
href="https://secure.safeshop.co.za/basket/basket_addItem.asp?StoreID=200024
&Sku=<%=RS("ID")%>&Retailprice=<%=RS("Cost")%>&Digest=<%= MD5(LCase(SafeKey
& StoreID & Sku))%>&ProductName='bob'">

Now you see where it says <%= MD5(LCase(SafeKey & StoreID & Sku))%> I need
to pull the id into this (where it says sku.  If I create this as a varible
then will it not be the unique id for each product?

What I have done is hard coded sku to be the second products number on the
default page so the transaction will go through but on products 1 and 3 it
will not because the sku number is wrong.

Thanks for all the advice. 



Kuminda Chandimith
Sr. Technical Consultant
Ducont.com FZ-LLC
Tel:  + 971-4-3913000 Ext 237
Fax: +971-4-3913001
http://www.ducont.com



-----Original Message-----
From: Neil Highley [mailto:[EMAIL PROTECTED]]
Sent: 20 August 2002 12:41
To: ActiveServerPages
Subject: Re: Defining a recorset as a variable


getrows?

Thats how you put it into an array, and close the recordset.

Or are you trying to get a unique value for SKU?

In that case you can either use a VBS routine to generate a code, check it
to see whether it exists (either by checking for an empty recordset ("select
SKU from records where SKU='<generated sku>'") or by doing it in T-SQL using
a while loop and the exists() function), then insert it.
You can also have an autoincrement field in SQL7 (and almost all RDBs) which
will start counting from the beginning field in steps of 1 (or whatever
number you choose).



[EMAIL PROTECTED]
-------------------------------------------------------
"Life must be lived as play."
- Plato (427 - 347 BC)
----- Original Message -----
From: "Sam Thompson" <[EMAIL PROTECTED]>
To: "ActiveServerPages" <[EMAIL PROTECTED]>
Sent: Tuesday, August 20, 2002 9:25 AM
Subject: Re: Defining a recorset as a variable


> I dont know what your asking for either, but maybe this is it?!?!:
>
>
> Dim Conn, RS, cnpath, SQL
> Set Conn = Server.CreateObject("ADODB.Connection")
> cnpath="DBQ=" & server.mappath("/database/instant.mdb")
> Conn.Open  "DRIVER={Microsoft Access Driver (*.mdb)}; " & cnpath &
> ";pwd=******"
>
> Set objRS = Conn.Execute("SELECT SKU FROM YourTable")
>
> Cat = Request.QueryString("Cat")
> SubCat = Request.QueryString("SubCat")
> SKU = objRS("SKU")
>
>
>
> HTH
> Sam Thompson
> ----------------------------------------------
> 2cs Communications Ltd
> http://www.2cs.com
> [EMAIL PROTECTED]
> T: 01473 622263
> F: 01473 622515
> -----------------------------------------------
> ----- Original Message -----
> From: <Rob Lamb`" <[EMAIL PROTECTED]>>
> To: "ActiveServerPages" <[EMAIL PROTECTED]>
> Sent: Tuesday, August 20, 2002 8:49 AM
> Subject: Defining a recorset as a variable
>
>
> > Hi
> >
> > I need to define a recorset as a variable.  I am really stuck and cant
get
> it right.  If I hard code the product number in I dont have a problem but
I
> need each product to have its unique number.
> >
> > I have connected to the database with an ADODB connection.
> >
> > Here is ny existing code please can someone advise me as what to do!
> >
> > <%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
> > <%
> > Option Explicit
> > Response.Buffer = True
> >
> > Dim Cat, SubCat, header, SKU
> >
> > Cat = Request.QueryString("Cat")
> > SubCat = Request.QueryString("SubCat")
> > SKU = I need the record value here
> >
> >         Dim Conn, RS, cnpath, SQL
> > Set Conn = Server.CreateObject("ADODB.Connection")
> > Set RS = Server.CreateObject("ADODB.RecordSet")
> > cnpath="DBQ=" & server.mappath("/database/instant.mdb")
> > Conn.Open  "DRIVER={Microsoft Access Driver (*.mdb)}; " & cnpath &
> ";pwd=******"
> > %>
> >
> > Thanks
> >
> > Rob
> > ---
> > You are currently subscribed to activeserverpages as: [EMAIL PROTECTED]
> > To unsubscribe send a blank email to
> %%email.unsub%%
> >
>
>
> ---
> You are currently subscribed to activeserverpages as:
[EMAIL PROTECTED]
> To unsubscribe send a blank email to
%%email.unsub%%
>
>


---
You are currently subscribed to activeserverpages as: [EMAIL PROTECTED]
To unsubscribe send a blank email to
%%email.unsub%%

---
You are currently subscribed to activeserverpages as: [email protected]
To unsubscribe send a blank email to [EMAIL PROTECTED]

Reply via email to