[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 590
  • Last Modified:

Calling functions with ASP

I am trying to figure out how to use the following functions to implement a complete ecommerce Wish List program.

The following functions have all the features needed to achieve a wish list program that let's a customer add a items to wish list, delete items from wish list, modify wish list, view items in wish list, delete wish list, etc.

All that is necessary for full featured wish list program are in these functions.

But how to make use of them is what I need help on.

Any help, as always, is greatly appreciated.

Here are the functions.

Function Wishlist_Initialize()
    'Is the B2C Module being loaded, if yes then load a wishlist based on whether the cookie has a valid wishlist ID
    'and whether the wishlist has a customer id on it or not.
    If Not Session("B2BModule") Then
        'Since Cart_Initialize was called already, assume that the Wishlist ID has been loaded.
        If Not IsBlank(Session("sWishlistID")) Then
            'Is the User Logged in. If Not then simply check the current cart and then load a corresponding cart
            If Not LoggedIn() Then
                If Wishlist_HasOwner(Session("sWishlistID")) Then
                    Session("sWishlistID") = ""
                End If
                Call Wishlist_Load()
            Else
                'If the user is logged in then get the correct wishlist for this customer and merge the existing wishlist.
                Session("sWishlistID") = Wishlist_MergeWishlists(Session("sWishlistID"))
                Call Wishlist_Load()
            End If    
        'First time user,load a blank cart and then save the cookie to the user's machine.
        Else
            Call Wishlist_Load()
        End If    
    Else
        'If logged in then load the default wishlist
        If LoggedIn() Then
            sWishListID = Wishlist_GetDefaultCustomerWishlist(Session("sCustomerID"),Session("nContactNO"))
            If IsBlank(sWishListID) Then
                Session("sWishListID") = ""
            Else
                Session("sWishListID") = sWishListID
            End If
            Wishlist_Load()
        End If        
    End If
    'Write the cookie back with the correct Wishlist ID.
    SaveCookie()
End Function

'************************************************************************
' Wishlist_GetDefaultCustomerWishlist()
' This function grabs from the database a wishlist id for a given Customer ID and contact Number
Function Wishlist_GetDefaultCustomerWishlist(sCustID,nContactNo)
    Dim WSObj, Rs,sWishlistID,sSql
    If Session("PrimaryUser") Then
        sSql = "Select * from WISHLIST where CUSTOMER_ID = '"& sCustID & "' and CONTACT_NO is null and NAME = 'PRIMARY_WISHLIST'"
    Else
        sSql = "Select * from WISHLIST where CUSTOMER_ID = '"& sCustID & "' and CONTACT_NO = '" & nContactNo & "' and NAME = 'PRIMARY_WISHLIST'"
    End If
    sWishlistID = null
    Set WSObj = Server.CreateObject("VwebSls.Sales")
    Set Rs = WSObj.Query(Session("VWEB"),sSql)
    If Not Rs.EOF Then
        sWishlistID = Rs("ID")
    End If
    Set WSObj = Nothing
    Set Rs = Nothing    
    Wishlist_GetDefaultCustomerWishlist = sWishlistID
End Function


'************************************************************************
' Wishlist_Load()
' Loads a Wishlist for a given session via the session("sWishlistID") variable, if this variable is empty
' then it loads a brand new Wishlist. If the Session variable has a value and the Wishlist can not be found
' then it loads a new Wishlist too.
Function Wishlist_Load()
    Dim WishlistObj, Rs
    Set WishlistObj = Server.CreateObject("VwebSls.Wishlist")

    'Check to see whether a Wishlist exists in the Session variable first
    If Not IsBlank(Session("sWishlistID")) Then
        Set Rs = WishlistObj.Load(Session("VWEB"), Session("sWishlistID"))
        If Rs.EOF Then
            'Wishlist exists but is not found in the database, load a brand new one and save its id to the session variable.
            Rs.AddNew()
            Rs("NAME") = "PRIMARY_WISHLIST"
            Rs("CUSTOMER_ID") = Session("sCustomerID")
            Rs("CONTACT_NO") = Session("nContactNO")
            Rs.Update()
            Set Rs = WishlistObj.Save(Session("VWEB"),Rs)
            Session("sWishlistID") = Rs("ID")
        End If
    Else
        Set Rs = WishlistObj.Load(Session("VWEB"),"")
        If Rs.EOF Then
            Rs.AddNew()
            Rs("NAME") = "PRIMARY_WISHLIST"
            Rs("CUSTOMER_ID") = Session("sCustomerID")
            Rs("CONTACT_NO") = Session("nContactNO")
            Rs.Update()
            Set Rs = WishlistObj.Save(Session("VWEB"),Rs)
            Session("sWishlistID") = Rs("ID")
        End If
    End If
    Set WishlistObj = Nothing
    Set Rs = Nothing
End Function


'************************************************************************
' Wishlist_Add()
' Add a part qty to the current Wishlist
Function Wishlist_Add(sPartID,sComments)
    Dim Wishlist
    Dim Rs, Rs2
    ' Get the shopping cart from session memory
    Set Wishlist = Server.CreateObject("VwebSls.Wishlist")
    If sComments = Null Then
        Set Rs = Wishlist.Load(Session("VWEB"), Session("sWishlistID"))
    Else
        Set Rs = Wishlist.Load(Session("VWEB"), Session("sWishlistID"),"WITH_TEXT_DATA")
    End If
    ' Add the parts to the Wishlist
    If Not Rs.EOF Then
        Set Rs2 = Rs("WISHLIST_LINE").Value
        Rs2.Filter = "PART_ID = '" & sPartID & "'"
        'If Part does not exist in the wishlist then add it else change the comments
        If Rs2.EOF Then
            Rs2.AddNew()
            Rs2("PART_ID") = sPartID
            If Not IsBlank(sComments) Then    Rs2("COMMENTS_DATA") = sComments
        Else
            If Not IsBlank(sComments) Then    Rs2("COMMENTS_DATA") = sComments
        End If
        Rs2.Update
        Rs.Update
        Set Rs = Wishlist.Save(Session("VWEB"), Rs)
    End If    
    Set Wishlist = Nothing
    Set Rs = Nothing
End Function


'************************************************************************
' Wishlist_HasOwner()
' This function will determine whether a wishlist which has been loaded has a Customer ID on it.    
Function Wishlist_HasOwner(sWishlistID)
    Dim Rs,WishlistObj, bExists
    bExists = False
    Set WishlistObj = Server.CreateObject("VwebSls.Wishlist")
    Set Rs = WishlistObj.Load(Session("VWEB"), sWishlistID)
    If Not Rs.EOF Then
        If Not IsBlank(Rs("CUSTOMER_ID").value)  Then
            bExists = True
        End If
    End If    
    Set Rs = Nothing
    Set WishlistObj = Nothing
    Wishlist_HasOwner = bExists
End Function

'************************************************************************
' Wishlist_MergeWishlists(sCurrentWishlistID)
'This function is used when the user has logged in(under the B2C style website) and you merge the current wishlist with
'the default wishlist used by this customer
Function Wishlist_MergeWishlists(sCurrentWishlistID)
    'The current wishlist does not belong to anyone. However the user might either have a wishlist in the system
    'or you might have to create a wishlist.
    'First check whether the user has a default wishlist.
    Dim WishObj, RsWish,RsWishlist
    Set WishObj = Server.CreateObject("VwebSls.Wishlist")
       
    sDefaultWishlistID = Wishlist_GetDefaultCustomerWishlist(Session("sCustomerID"),Session("nContactNO"))
    If Not IsBlank(sDefaultWishlistID) Then
        Set RsWish = WishObj.Prepare(Session("VWEB"),"MERGE_WISHLISTS")
        If RsWish.EOF Then
            RsWish.AddNew()
            RsWish("FROM_ID") = sCurrentWishlistID
            RsWish("TO_ID") = sDefaultWishlistID
            RsWish.Update
            Set RsWish = WishObj.Save(Session("VWEB"),RsWish)
            Wishlist_MergeWishlists = RsWish("TO_ID")
        End If
    'Customer does not have a default Wishlist, make the current one his since it does not belong to anyone.
    Else
        Set RsWishlist = WishObj.Load(Session("VWEB"),sCurrentWishlistID)
        If Not RsWishlist.EOF Then
            RsWishlist("NAME") = "PRIMARY_WISHLIST"
            RsWishlist("CUSTOMER_ID") = Session("sCustomerID")
            RsWishlist("CONTACT_NO") = Session("nContactNO")
            RsWishlist.Update
            Set RsWishlist = WishObj.Save(Session("VWEB"),RsWishlist)
        End If
        'Return the same Wishlist ID as the default Wishlist for this customer.
        Wishlist_MergeWishlists = sCurrentWishlistID
    End If
    Set WishObj = Nothing
    Set RsWish = Nothing
    Set RsWishlist = Nothing    
    'Delete the wishlist which was just merged if there are no user's associated with it.
    'If Not Wishlist_HasOwner(sCurrentWishlistID) Then
    '    Wishlist_DeleteWishlist(sCurrentWishlistID)
    'End If
End Function

'************************************************************************
'Wishlist_DeleteWishlist(sCurrentWishlistID)
'This function deletes a wishlist from the system.
Function Wishlist_DeleteWishlist(sWishlistID)
    Dim WishlistObj, Rs
    Set WishlistObj = Server.CreateObject("VwebSls.Wishlist")
    Set Rs = WishlistObj.Load(Session("VWEB"),sWishlistID)
    If Not Rs.EOF Then
        Rs("RECORD_IDENTITY") = "DELETE"
        Rs.Update()
        Set Rs = WishlistObj.Save(Session("VWEB"),Rs)
    End If
    Set WishlistObj = Nothing
    Set Rs = Nothing    
End Function

'************************************************************************
'Wishlist_DeleteItem(sPartID)
'This function deletes items from the wishlist
Function Wishlist_DeleteItem(sPartID)
    Dim Obj, Rs,RsLine
    Set Obj = Server.CreateObject("VwebSls.Wishlist")
    Set Rs = Obj.Load(Session("VWEB"),Session("sWishlistID"))
    If Not Rs.EOF Then
        Set RsLine = Rs("WISHLIST_LINE").value
        RsLine.Filter = "PART_ID = '"& sPartID & "'"
        If Not RsLine.EOF Then
            RsLine("RECORD_IDENTITY") = "DELETE"
            RsLine.Update()
        End If
        Rs.Update()
        Set Rs = Obj.Save(Session("VWEB"),Rs)
    End If
    Set Obj = Nothing
    Set Rs = Nothing
    Set RsLine = Nothing    
End Function

'************************************************************************
'ValidWishlistName(sWishlistName)
'This function determines that the wishlist name being given does not already exist in the system
'for a given customer and contact no
Function ValidWishlistName(sWishlistName)
    Dim QueryObj2,bSuccess, Rs,sSql
    bSuccess = False
    If Session("PrimaryUser") Then
        sSql = "select * from WISHLIST where NAME = '" & sWishlistName & "' and CUSTOMER_ID = '" & Session("sCustomerID") & "' and CONTACT_NO is null "
    Else
        sSql = "select * from WISHLIST where NAME = '" & sWishlistName & "' and CUSTOMER_ID = '" & Session("sCustomerID") & "' and CONTACT_NO = " & Session("nContactNO")
    End If
    Set QueryObj2 = Server.CreateObject("VwebSls.Sales")
    Set Rs = QueryObj2.Query(Session("VWEB"),sSql)
    If Rs.EOF Then
        bSuccess = True
    End If
    Set QueryObj2 = Nothing
    Set Rs = Nothing
    ValidWishlistName = bSuccess    
End Function

'************************************************************************
'Create_NewWishlist(sWishlistName)
'Creates a new wishlist for a given customer and contact number and then resets the Current Wishlist being loaded to the new one.
Function Create_NewWishlist(sWishlistName)
    Dim WishlistObj2, RsWishlist
    Set WishlistObj2 = Server.CreateObject("VwebSls.Wishlist")
    Set RsWishlist = WishlistObj2.Load(Session("VWEB"),"")
    If RsWishlist.EOF Then
        RsWishlist.AddNew()
        RsWishlist("NAME") = sWishlistName
        RsWishlist("CUSTOMER_ID") = Session("sCustomerID")
        RsWishlist("CONTACT_NO") = Session("nContactNO")
        RsWishlist.Update()
        Set RsWishlist = WishlistObj2.Save(Session("VWEB"),RsWishlist)
        Session("sWishlistID") = RsWishlist("ID")
    End If
    Set WishlistObj2 = Nothing
    Set RsWishlist = Nothing
End Function

%>
0
nigerman
Asked:
nigerman
  • 27
  • 24
  • 5
1 Solution
 
fritz_the_blankCommented:
Step 1:  Put all of these functions in an include file, and include that include file on all pages where you will need the code
Step 2: Call the functions as necessary. Let's say someone wants to add an item to the wishlist, you would have the user click on a button or link that passes the item ID as a parameter to the processing page and then call the function like this:

call Wishlist_Add('P0ER1237','P0ER1237 is the part number and this is the wishlist comment')

FtB
0
 
fritz_the_blankCommented:
However, it looks to me like these scripts depend upon a certain database structure, installed components and etc. So, please don't operate under the assumption that all of the code that you have above is self-contained.

FtB
0
 
nigermanAuthor Commented:
hi FtB,

I understand your feedback on your first response...thanks.

I have the database structure to work with the wishlist code.

The components part of the equation is what is confusing me.

I don't even know what component I need or how to use it to make this work.

At least,let me understand what component or dll I need.
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
fritz_the_blankCommented:
If I knew myself, I wouldn't be so cryptic and would tell you directly!!!  But look at this line:

Set WishlistObj = Server.CreateObject("VwebSls.Wishlist")

Clearly there is some .dll or .wsc associated with these scripts.

FtB
0
 
nigermanAuthor Commented:
Thanks for the response Fritz.

But here is a nagging question for you the experts.

Is there a simpler way to implement a wish list program?

It doesn't have to look like amazon wish list program.

But something that allows a customer to either add to cart or add to wish list.

Believe it or not, this is the only holdup to my ecommerce program.
0
 
fritz_the_blankCommented:
None of this is very easy. I imagine that you are going to use a database to keep track of each user's wish list?

FtB
0
 
fritz_the_blankCommented:
0
 
nigermanAuthor Commented:
Ok, I will go through this list to see if I can find something.

Thanks again!
0
 
fritz_the_blankCommented:
Glad to have helped but am sorry that it is not what you wanted to hear. If coding ASP projects were that easy, everyone would be able to do it!!!

FtB
0
 
peh803Commented:
@nigerman:

Perhaps it would be easier to take a step back and ask a simple question:

What exactly do you want this wish list to do?  Instead of guessing how to debug your code above, get the objects to work as they're supposed to, (which would be very difficult without some kind of documentation, object model, etc.) and patchworking it together to something that *might* do some of the stuff you want, let's step back and see if designing something specific to suit your needs would make sense.  So, given this, are you up for it?  What functionality, exactly, are you looking to provide to your users with this wish list functionality?

Thanks,
peh803
0
 
nigermanAuthor Commented:
just 3 basic functionalities = the ability to add a product to a wish list table, the ability to view products in the wish list, and the ability to  delete product(s) from the wish list.

If I can get those 3 to work, that's enough for what the user needs.
0
 
peh803Commented:
Okay, so do you have a wishlist table in your database currently?  If so, what does it look like?

Thanks,
peh803
0
 
fritz_the_blankCommented:
In order for this to work, each user would have to authenticate and have a unique ID so that the list could be retrieved. I suspect that you would want one table for users that would have a username, password, and unique (auto-counter) ID and another table that would have a uniqe wish list id, the customer id, and then an id that links out the products table. Finally, there would be a products table with unique product IDs.

To see the wish list for a given user then, you would create a join between the wish list and product table filtered by the unique user id.

FtB


0
 
nigermanAuthor Commented:
I have several tables to 3 are relevant to the wish list, at least that is my design idea.

One table is called wishList with 2 fields:
WcustomerID foreign key to custid in customer table ( for joining to customer table and authenticating users)
WcatalogID foreign key to catalogId in Products table

Then there is products table with many fields including:
oCustomerid foreign key to custid in customer table (for joining to customer table)
catalogID unique product id

Then there is customers table with following:
custid  - unique Id
username  and password (for autenticating users)

and other customer related fields.

I believe that these 3 tables will work well to produce a wish list functionality.

Of course you may have a better design idea.


0
 
fritz_the_blankCommented:
That sounds pretty much like I was saying above. Now, any time a user wants to add an item to the wish list, you need only insert the user id and the product id to add the record. To display the list, you would do a sql select on the joined tables filtered by user id and etc.

FtB
0
 
nigermanAuthor Commented:
User id?
Did you mean customer ID?

I thought that if you join customer table with wish list table by customerid and then wishlist table by product table by catalogid, you get to view products in the wish list.

The other question that I have is this, do you create the insert statement to insert the ids into the wishlist table the same time you are creating one for inserting into products table (for adding items to the cart)?

Oh well, I am not even close to getting this done anyway.

We'll see what happens
0
 
fritz_the_blankCommented:
Sorry, I meant customer ID (the unique id that each user has).

As for your second question, does it make sense to add an item to the wishlist when they are adding it to the cart?

ftB
0
 
nigermanAuthor Commented:
hi ftB and peh803,

I have been working real hard at this wishlist code trying to make it work.

Still struggling mightily.

I have streamlined the functions/subs by extracting what I think I needed.

I have also tried to come up with an html code (at bottom of functions/subs) that will invoke them but so far, I am getting a blank page.

I would really appreciate someone bailing me out on this.

I know this is none of you guys problem but I really have one week to rap this whole thing up and the biggest headache and infact the only headache I have now is this wish list code.

Thanks all in advance.

Below is what I have so far.

<%
Sub AddToWishList(ProductID)
    Set apples = Server.CreateObject("ADODB.Connection")
    ConnStr = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath("db\cart.mdb") & ";User Id=admin;Password="
    apples.Open(ConnStr)

    If Not IsNumeric(ProductID) Then
      Response.Write "ProductID must be numeric."
      Response.End
    End If

    SQLtemp="Insert Into WishList (icustomerID, ProductID) values (" & Session("icustomerID") & ", " & ProductID & ")"
    apples.Execute SQLtemp
    Set apples = Nothing
End Sub

Function GetWishList(icustomerID, productID)
    Set apples = Server.CreateObject("ADODB.Connection")
    ConnStr = "DRIVER={Microsoft Access Driver (*.mdb)}; "
    ConnStr = ConnStr & "DBQ=" & Server.MapPath("db\cart.mdb")
    apples.Open(ConnStr)

    If Not IsNumeric(icustomerID) Then
      Response.Write "Customer ID must be numeric."
      Response.End
    End If

    Set SQL = ("Select Products.cName, " _
        & "Products.catalogID, Products.cPrice, Products.cover10Price " _
        & "From Products INNER JOIN WishList ON " _
        & "Products.catalogID = WishList.ProductID " _
        & "Where WishList.icustomerID = " & icustomerID _
        & " Order By Products.cName")
   Set RSProducts = Apples.Execute(SQL)

    Do Until RSProducts.EOF
        TempReturn = TempReturn & "<B>Product Name: </B><A HREF=""" _
            & Products.asp & "?ProductID=" & RSProducts("catalogID") _
            & """><B></B>" & RSProducts("ProductName") _
            & "</A><B>Regular Price: </B>" _
            & FormatCurrency(RSProducts("cPrice"),2) & "<P>" _
            & FormatCurrency(RSProducts("cover10Price"),2) & "<P>" _
            & vbNewLine
        RSProducts.MoveNext
    Loop
    GetWishList = TempReturn
End Function

Sub RemoveFromWishList(OrderID)

Set Apples = Server.CreateObject("ADODB.Connection")
ConnStr = "DRIVER={Microsoft Access Driver (*.mdb)}; "
ConnStr = ConnStr & "DBQ=" & Server.MapPath("db\cart.mdb")
Apples.Open(ConnStr)

    If Not IsNumeric(OrderID) Then
      Response.Write "OrderID must be numeric."
      Response.End
    End If

    SQLtr="Delete From WishList " _
        & "Where OrderID = " & OrderID
   Set rs = Apples.Execute(SQLtr)

End Sub
%>
    <HTML>
    <BODY>
    <TABLE BORDER=0 CELLSPACING=0 CELLPADDING=0>
    <TR>
    <TD>
    <%

    'Declare our Vars
     Dim sAction ' as string

    ' Select action based on user input
       sAction = CStr(Request.QueryString("action"))

    Select Case sAction
        Case "add"
            AddToWishlist icustomerID, productID
            GetWishlist
            %>
            </TD></TR>
            <TR><TD ALIGN="right">
            <A HREF="wishlist.asp?action="><IMG SRC="images/shop_look.gif" BORDER=0 WIDTH=46 HEIGHT=46 ALT="Continue Looking"></A>
            <%
        Case "del"
            RemoveFromWishlist icustomerID, productID
            GetWishlist
            %>
            </TD></TR>
            <TR><TD ALIGN="right">
            <A HREF="wishlist.asp?action="><IMG SRC="images/shop_look.gif" BORDER=0 WIDTH=46 HEIGHT=46 ALT="Continue Looking"></A>
            <%
        Case "viewlist"
            GetWishlist
            %>
            </TD></TR>
            <TR><TD ALIGN="right">
            <A HREF="wishlist.asp?action="><IMG SRC="images/shop_look.gif" BORDER=0 WIDTH=46 HEIGHT=46 ALT="Continue Looking"></A>
            </TD></TR>
            <TR><TD ALIGN="right">
            <A HREF="wishlist.asp?action=viewlist">View wish list</font><img src="images/cart04.gif" width="15" height="11" border="0" ALT="View Cart Contents"></A>
            <%
    End Select

'clear the memory
Set rst = Nothing
%>
</TD>
</TR>
</TABLE>
</BODY>
</HTML>
0
 
peh803Commented:
Do you have the code somewhere online where I can view it?
0
 
nigermanAuthor Commented:
I have a different version from this one I just posted now.
THe reason I did not post the one I have online is that i wasn't sure if it would be more difficult.

That online version displays the products and adds to wishlist but doesn't add to the wishlist table.

Take a look at that and let me know if you would rather see that code:

http://websamba.com/aparish/millenniumhealthproducts/home.asp

THis has become so very desparate for me now and I am sorry I keep bugging you.
0
 
nigermanAuthor Commented:
Ok, I have made some real progress on this.

I have successfully created a products page ( a page that will list all the products for a customer to choose from). I have tested it and it seems to work.
I have also created an insert page which will allow a customer to insert however many items she or he selected into a wishlist table.

This seems to work well also.

If I have enough time, I am sure I will successfully create a page that will allow a customer to either view items on his or her wish list or give a friend his or her login credentials to view them for him or her.

I know that the following query will atleast show the items based on customerid:

select * from wishlist
             INNERJOIN products on wishlist.productid = products.catalofid
             INNERJOIN customers on wishlist.idcustomer=customers.custid
where wishlist.idcustomer = session(userid)
But I have a feeling there is a whole lot more that need to be done for the view my wishlist to work.

I am so desparate for time that I would really need help on this

Below are the 2 working pages that I have so far:

wishlistproducts.asp:

<HEAD>
<TITLE>Pick products to add to your Wish List</TITLE>
</HEAD>
<BODY>
<CENTER>
<h2>Pick products to add to your Wish List</h2>
<P>
<FORM Action="WishList.asp" METHOD="GET">
<TABLE Border=1 CellPadding=5 bordercolor=steelBLUE cellspacing=0>
    <TR>
    <TH align=center>Check<br/>to<br/>Add</TH>
    <TH>Product name</TH>
    <TH>Price (1-9)</TH>
    <TH>Price (10 or more)</TH>
    <TH>Details?</TH>
    </TR>
<%
session("userid") = 4

IF session("userid") = "" Then 'We have no value in session

  response.redirect "error.asp?msg=" & server.urlencode("some services require you to login or register")

End IF

Set objConn=Server.CreateObject("ADODB.Connection")
objConn.Open "PROVIDER=Microsoft.Jet.OLEDB.4.0;" & _
             "DATA SOURCE=" & server.mappath("admin\scart.mdb")
SQL = "SELECT * FROM products ORDER BY cname"
Set rs = objConn.Execute( SQL )

Do While Not rs.EOF
%>
    <TR>
    <TD><INPUT Type=Checkbox Name="AddProduct" Value="<%=rs("ccode")%>" >
        &nbsp;
        <IMG SRC="img/small/<%=rs("cimageurl")%>" Border="0" Height="100" Width="75"></TD>
    <TD><B><%= rs("cname") %></B><br/>
        <FONT SIZE="2">(<%= rs("ccode") %>)</font>
    </TD>
    <TD><font color="red">$<%= FormatNumber(rs("cPrice"),2) %></font></TD>
    <TD><font color="red">$<%= FormatNumber(rs("cover10Price"),2) %></font></TD>
    <TD><A TARGET="POPUP" href="product.asp?id=<%=rs("catalogID")%>">View Details</a></TD>
    </TR>
<%
    rs.MoveNext
Loop
rs.Close
objConn.Close
%>
<TR>
    <TD colspan=5 align=center>
    <INPUT Type=Submit Value="Add checked items to wish list">
    </TD>
</TR>
</TABLE>
</BODY></HTML>

wishlist.asp

<HTML><BODY>
<%
sprods = Request("AddProduct")
If sprods = "" Then
   Response.Write "No products given to us to add!!<P>Doing nothing."
   Response.End
End If

prods = Split( sprods, ", " ) ' comma-space!
For pnum = 0 TO UBound(prods)
    Response.Write "User asked to add product " & prods(pnum) & "<br/>"
    SQL = "INSERT INTO WishList (idCustomer, iproductID) " _
         & " VALUES(" & Session("userID") & "," & prods(pnum) & ")"
    Response.Write "SQL: " & SQL & "<P>" & vbNewLine
Next
%>
</BODY></HTML>
0
 
fritz_the_blankCommented:
If you have a specific question, I will try to give you a hand...

FtB
0
 
nigermanAuthor Commented:
hi Fritz,

Sorry I am late in responding.

I been doing the best I can to solve my own problems but unfortunately, I just keep hitting snags.

Right now, as stated earlier, add to wish list functionality is working... stuff is getting inserted into the wish list table.

There 2, I hope, specific problems that I am having.

1, after inserting an item to the wishlist table, I would like the customer to view his/her current wish list items.

The code seems right but the items added to the wish list table are not getting displayed on the screen for the customer to see.

Not sure why.

Second, on the delete from the wishlist side of things, when I try to Remove an item from wish list, I get the following error:

Error Type:
Microsoft JET Database Engine (0x80040E0C)
Command text was not set for the command object.
/WishList.asp, line 28


I have attached the entire code below.

Please, please help... it is really getting desparate now.

It is probably something real simple...but I can't see it.



<HTML><BODY>
<%
IF session("custid") = "" Then 'We have no value in session

  response.redirect "error.asp?msg=" & server.urlencode("some services require you to login or register")

End IF

Set objConn=Server.CreateObject("ADODB.Connection")
objConn.Open "PROVIDER=Microsoft.Jet.OLEDB.4.0;" & _
             "DATA SOURCE=" & server.mappath("admin\scart.mdb")

' Did user ask to add any items to the wishlist?
If Request("AddToWishList") <> "" Then

    items = Request("AddItem")
    If Trim(items) = "" Then
       Response.Write "No products given to us to add!!<P>Doing nothing."
       Response.End
   End If

        items = Split( items, ", " ) ' comma-space
        For inum = 0 To UBound(items)
    SQL = "INSERT INTO WishList (idCustomer, idProduct) " _
         & " VALUES(" & Session("custID") & "," & items(inum) & ")"
Next
End If
Set rs = objConn.Execute( SQL )
'response.write SQL
'response.end


' Did user ask to delete any items from the wishlist?
If Request("DeleteFromWishList") <> "" Then
    ' yep
    items = Request("RemoveItem")
    If Trim(items) = "" Then
       Response.Write "No products given to us to add!!<P>Doing nothing."
       Response.End
    End If

  'Now let's remove an item or items from the wishlist
   SQL = "DELETE FROM wishlist " _
              & " WHERE idCustomer=" & Session("custID") & " " _
              & " AND idProduct IN ('" & Replace( items, ", ", "','" ) & "')"
   Set rs = objConn.Execute( SQL )
   Response.Write "Removing: " & SQL & "<br/>"
End If ' end of if user asked to remove items

' now show current state of wishlist:
' In this simulation, we can only show the product ID of each...
' in the real thing, the SQL would of course show all relevant info
Response.Write "<HR>"

SQL = "SELECT * FROM wishlist WHERE idCustomer = " & Session("custID") & " "
Set rs = objConn.Execute( SQL )

Response.Write "Getting wishlist: " & SQL & "<HR>"
%>
<FORM>
<TABLE Border=1 CellPadding=5>
<TR>
   <TH>Remove<br/>from list</TH>
   <TH>Product ID</TH>
   <TH>Description</TH>
</TR>

<%
Do While Not rs.EOF
%>
        <TR>
        <TD><INPUT Type=Checkbox Name="RemoveItem" Value="<%=item%>"></TD>
        <TD><%=item%></TD>
        <TD>&nbsp;</TD>
        </TR>
<%
    rs.MoveNext
Loop
rs.Close
objConn.Close
%>
<TR>
    <TD Colspan=3>&nbsp;</TD>
</TR>
<TR>
    <TD>
    <INPUT Type=Submit Name="DeleteFromWishlist"
           Value="Remove checked items to wishlist">
    </TD>
    <TD>&nbsp;</TD>
    <TD align=right>
    <INPUT Type=Submit Value="Show the list of products"
           onClick="this.form.action='productChoices.asp'; return true;">
    </TD>
</TR>
</TABLE>
</FORM>
</BODY></HTML>
0
 
fritz_the_blankCommented:
Let's take a look at the second problem:

  'Now let's remove an item or items from the wishlist
   SQL = "DELETE FROM wishlist " _
              & " WHERE idCustomer=" & Session("custID") & " " _
              & " AND idProduct IN ('" & Replace( items, ", ", "','" ) & "')"
   Set rs = objConn.Execute( SQL )
   Response.Write "Removing: " & SQL & "<br/>"
End If ' end of if user asked to remove items


Try this instead, and let me know what happens (I realize that it won't delete, this is to troubleshoot):

  SQL = "DELETE FROM wishlist " _
              & " WHERE idCustomer=" & Session("custID") & " " _
              & " AND idProduct IN ('" & Replace( items, ", ", "','" ) & "')"
   response.write SQL
   response.end
   Set rs = objConn.Execute( SQL )

Also, I don't see how this could return a recordset--you are doing a delete not a select, does that make sense?

FtB
   Response.Write "Removing: " & SQL & "<br/>"
0
 
nigermanAuthor Commented:
hi Fritz,
I am not not displaying any records on screen and I am still getting same error:

Error Type:
Microsoft JET Database Engine (0x80040E0C)
Command text was not set for the command object.
/WishList.asp, line 28
0
 
fritz_the_blankCommented:
The line:

response.write SQL

should have written out the sql statement for the command text. If it did not, that means either you have no sql statement, hence the error, or that you didn't implement the changes that I posted above (perhaps you need to refresh the page after modifying it?)

FtB
0
 
nigermanAuthor Commented:
I implemented your recommendation.

The error is on line 34 which is here:

objConn.Execute( SQL )

and this is on the insert statement block.

What I don't understand is that records are being inserted with that insert statement.
0
 
fritz_the_blankCommented:
Please post the whole page as you are using it now. The error is coming too late...

FtB
0
 
nigermanAuthor Commented:
here is the entire page and thanks much for the help.

<HTML><BODY>
<%
IF session("custid") = "" Then 'We have no value in session

  response.redirect "error.asp?msg=" & server.urlencode("some services require you to login or register")

End IF


'####################################################
'# Start inserting selected wish list
'####################################################

Set rs = Server.CreateObject("ADODB.Recordset")
Set objConn=Server.CreateObject("ADODB.Connection")
objConn.Open "PROVIDER=Microsoft.Jet.OLEDB.4.0;" & _
             "DATA SOURCE=" & server.mappath("admin\scart.mdb")

' Did user ask to add any items to the wishlist?
If Request("AddToWishList") <> "" Then

    items = Request("AddItem")
    If Trim(items) = "" Then
       Response.Write "No products given to us to add!!<P>Doing nothing."
       Response.End
   End If

        items = Split( items, ", " ) ' comma-space
        For inum = 0 To UBound(items)
    SQL = "INSERT INTO WishList (idCustomer, idProduct) " _
         & " VALUES(" & Session("custID") & "," & items(inum) & ")"
Next
End If
objConn.Execute(SQL)
'response.write SQL
'response.end


'####################################################
'# Start deleting selected item
'####################################################

' Did user ask to delete any items from the wishlist?
If Request("DeleteFromWishList") <> "" Then
    ' yep
    items = Request("RemoveItem")
    If Trim(items) = "" Then
       Response.Write "No products given to us to add!!<P>Doing nothing."
       Response.End
    End If

  SQL = "DELETE FROM wishlist " _
              & " WHERE idCustomer=" & Session("custID") & " " _
              & " AND idProduct IN ('" & Replace( items, ", ", "','" ) & "')"
   response.write SQL
   response.end
   objConn.Execute( SQL )
End If ' end of if user asked to remove items

Response.Write "<HR>"


'####################################################
'# Start selecting wish list
'####################################################

SQL = "SELECT * FROM wishlist WHERE idCustomer = " & Session("custID") & " "
Set rs = objConn.Execute( SQL )

Response.Write "Getting wishlist: " & SQL & "<HR>"
%>
<FORM>
<TABLE Border=1 CellPadding=5>
<TR>
   <TH>Remove<br/>from list</TH>
   <TH>Product ID</TH>
   <TH>Description</TH>
</TR>

<%
Do While Not rs.EOF
%>
        <TR>
        <TD><INPUT Type=Checkbox Name="RemoveItem" Value="<%=item%>"></TD>
        <TD><%=item%></TD>
        <TD>&nbsp;</TD>
        </TR>
<%
    rs.MoveNext
Loop
rs.Close
objConn.Close
%>
<TR>
    <TD Colspan=3>&nbsp;</TD>
</TR>
<TR>
    <TD>
    <INPUT Type=Submit Name="DeleteFromWishlist"
           Value="Remove checked items to wishlist">
    </TD>
    <TD>&nbsp;</TD>
    <TD align=right>
    <INPUT Type=Submit Value="Show the list of products"
           onClick="this.form.action='productChoices.asp'; return true;">
    </TD>
</TR>
</TABLE>
</FORM>
</BODY></HTML>
0
 
fritz_the_blankCommented:
Okay, the error is coming from the insert into wishlist function. The reason is that you execute the sql regardless of the if statement!!!!! Let's try this:

<HTML><BODY>
<%
IF session("custid") = "" Then 'We have no value in session

  response.redirect "error.asp?msg=" & server.urlencode("some services require you to login or register")

End IF


'####################################################
'# Start inserting selected wish list
'####################################################

Set rs = Server.CreateObject("ADODB.Recordset")
Set objConn=Server.CreateObject("ADODB.Connection")
objConn.Open "PROVIDER=Microsoft.Jet.OLEDB.4.0;" & _
             "DATA SOURCE=" & server.mappath("admin\scart.mdb")

' Did user ask to add any items to the wishlist?
If Request("AddToWishList") <> "" Then

    items = Request("AddItem")
    If Trim(items) = "" Then
       Response.Write "No products given to us to add!!<P>Doing nothing."
       Response.End
   End If

        items = Split( items, ", " ) ' comma-space
        For inum = 0 To UBound(items)
    SQL = "INSERT INTO WishList (idCustomer, idProduct) " _
         & " VALUES(" & Session("custID") & "," & items(inum) & ")"
             objConn.Execute(SQL)

Next
End If


'####################################################
'# Start deleting selected item
'####################################################

' Did user ask to delete any items from the wishlist?
If Request("DeleteFromWishList") <> "" Then
    ' yep
    items = Request("RemoveItem")
    If Trim(items) = "" Then
       Response.Write "No products given to us to add!!<P>Doing nothing."
       Response.End
    End If

  SQL = "DELETE FROM wishlist " _
              & " WHERE idCustomer=" & Session("custID") & " " _
              & " AND idProduct IN ('" & Replace( items, ", ", "','" ) & "')"
   response.write SQL
End If ' end of if user asked to remove items

Response.Write "<HR>"


'####################################################
'# Start selecting wish list
'####################################################

SQL = "SELECT * FROM wishlist WHERE idCustomer = " & Session("custID") & " "
Set rs = objConn.Execute( SQL )

Response.Write "Getting wishlist: " & SQL & "<HR>"
%>
<FORM>
<TABLE Border=1 CellPadding=5>
<TR>
   <TH>Remove<br/>from list</TH>
   <TH>Product ID</TH>
   <TH>Description</TH>
</TR>

<%
Do While Not rs.EOF
%>
        <TR>
        <TD><INPUT Type=Checkbox Name="RemoveItem" Value="<%=item%>"></TD>
        <TD><%=item%></TD>
        <TD>&nbsp;</TD>
        </TR>
<%
    rs.MoveNext
Loop
rs.Close
objConn.Close
%>
<TR>
    <TD Colspan=3>&nbsp;</TD>
</TR>
<TR>
    <TD>
    <INPUT Type=Submit Name="DeleteFromWishlist"
           Value="Remove checked items to wishlist">
    </TD>
    <TD>&nbsp;</TD>
    <TD align=right>
    <INPUT Type=Submit Value="Show the list of products"
           onClick="this.form.action='productChoices.asp'; return true;">
    </TD>
</TR>
</TABLE>
</FORM>
</BODY></HTML>


0
 
nigermanAuthor Commented:
the error went away (thanks) but 2 problems still exist.

Now, instead of the error, I get this:

No products given to us to delete!!
Doing nothing.

I believe that the reason is because nothing is still getting displayed on the screen.

In other words, the select statement is not working for some reason


BTW: on my delete validation,

I used the same message - No products given to us to add!!
Doing nothing.

I have now changed it to:

No products given to us to delete!!
Doing nothing

and that is the message I am getting now.
0
 
fritz_the_blankCommented:
Okay, so now you are not able to delete, is that correct? Post your latest code so we can move through the next step.

FtB
0
 
nigermanAuthor Commented:
Yes, not able to delete, primarily because no items are being displayed on the screen.

The intent is to display items on the screen and using a checkbox, check whichever records we wish to delete and then click the "Remove checked items" button.

Only change I made to the code you asked me to try is the to add objConn.Execute (SQL) to the delete block.

I added this *only* after I got the message I posted last time.

<HTML>
<HEAD>
<TITLE>---</TITLE>
<META HTTP-EQUIV="Pragma" CONTENT="no-cache">
<META HTTP-EQUIV="Expires" CONTENT="-1">
</HEAD>
<BODY>
<%
IF session("custid") = "" Then 'We have no value in session

  response.redirect "error.asp?msg=" & server.urlencode("some services require you to login or register")

End IF


'####################################################
'# Start inserting selected wish list
'####################################################

Set rs = Server.CreateObject("ADODB.Recordset")
Set objConn=Server.CreateObject("ADODB.Connection")
objConn.Open "PROVIDER=Microsoft.Jet.OLEDB.4.0;" & _
             "DATA SOURCE=" & server.mappath("admin\scart.mdb")

' Did user ask to add any items to the wishlist?
If Request("AddToWishList") <> "" Then

    items = Request("AddItem")
    If Trim(items) = "" Then
       Response.Write "No products given to us to add!!<P>Doing nothing."
       Response.End
   End If

        items = Split( items, ", " ) ' comma-space
        For inum = 0 To UBound(items)
    SQL = "INSERT INTO WishList (idCustomer, idProduct) " _
         & " VALUES(" & Session("custID") & "," & items(inum) & ")"
           objConn.Execute(SQL)

Next
End If


'####################################################
'# Start deleting selected item
'####################################################

' Did user ask to delete any items from the wishlist?
If Request("DeleteFromWishList") <> "" Then
    ' yep
    items = Request("RemoveItem")
    If Trim(items) = "" Then
       Response.Write "No products given to us to delete!!<P>Doing nothing."
       Response.End
    End If

  SQL = "DELETE FROM wishlist " _
              & " WHERE idCustomer=" & Session("custID") & " " _
              & " AND idProduct IN ('" & Replace( items, ", ", "','" ) & "')"
    objConn.Execute(SQL)
   response.write SQL
   response.end
End If ' end of if user asked to remove items

Response.Write "<HR>"


'####################################################
'# Start selecting wish list
'####################################################

SQL = "SELECT * FROM wishlist WHERE idCustomer = " & Session("custID") & " "
Set rs = objConn.Execute(SQL)

Response.Write "Getting wishlist: " & SQL & "<HR>"
%>
<FORM>
<TABLE Border=1 CellPadding=5>
<TR>
   <TH>Remove<br/>from list</TH>
   <TH>Product ID</TH>
   <TH>Description</TH>
</TR>

<%
Do While Not rs.EOF
%>
        <TR>
        <TD><INPUT Type=Checkbox Name="RemoveItem" Value="<%=item%>"></TD>
        <TD><%=item%></TD>
        <TD>&nbsp;</TD>
        </TR>
<%
    rs.MoveNext
Loop
rs.Close
objConn.Close
%>
<TR>
    <TD Colspan=3>&nbsp;</TD>
</TR>
<TR>
    <TD>
    <INPUT Type=Submit Name="DeleteFromWishlist" Value="Remove checked items to wishlist">
    </TD>
    <TD>&nbsp;</TD>
    <TD align=right>
    <INPUT Type=Submit Value="Show the list of products" onClick="this.form.action='productChoices.asp'; return true;">
    </TD>
</TR>
</TABLE>
</FORM>
</BODY></HTML>
0
 
fritz_the_blankCommented:
Now I am confused. If you get this:

No products given to us to delete!!<P>Doing nothing.

Then we can't figure out what if anything is wrong with your code.

Are you certain that you are passing values to delete?

FtB
0
 
nigermanAuthor Commented:
ok, at the bottom of the while loop, I have this:

    <INPUT Type=Submit Name="DeleteFromWishlist" Value="Remove checked items to wishlist">

form variable name called DeleteFromWishlist

The value of the item to be deleted is passed from this code (at least that was my intent):

'####################################################
'# Start deleting selected item
'####################################################

' Did user ask to delete any items from the wishlist?
If Request("DeleteFromWishList") <> "" Then
    ' yep
    items = Request("RemoveItem")
    If Trim(items) = "" Then
       Response.Write "No products given to us to delete!!<P>Doing nothing."
       Response.End
    End If

  SQL = "DELETE FROM wishlist " _
              & " WHERE idCustomer=" & Session("custID") & " " _
              & " AND idProduct IN ('" & Replace( items, ", ", "','" ) & "')"
    objConn.Execute(SQL)
   response.write SQL
   response.end
End If ' end of if user asked to remove items

Notice also the form variable RemoveItem. This is where a value of an item to be deleted is passed through the checkbox.
0
 
fritz_the_blankCommented:
Right, but I ask again, do you know for certain that values are being passed? This should tell us:

<HTML>
<HEAD>
<TITLE>---</TITLE>
<META HTTP-EQUIV="Pragma" CONTENT="no-cache">
<META HTTP-EQUIV="Expires" CONTENT="-1">
</HEAD>
<BODY>
<%
IF session("custid") = "" Then 'We have no value in session

  response.redirect "error.asp?msg=" & server.urlencode("some services require you to login or register")

End IF


'####################################################
'# Start inserting selected wish list
'####################################################

Set rs = Server.CreateObject("ADODB.Recordset")
Set objConn=Server.CreateObject("ADODB.Connection")
objConn.Open "PROVIDER=Microsoft.Jet.OLEDB.4.0;" & _
             "DATA SOURCE=" & server.mappath("admin\scart.mdb")

' Did user ask to add any items to the wishlist?
If Request("AddToWishList") <> "" Then

    items = Request("AddItem")
    If Trim(items) = "" Then
       Response.Write "No products given to us to add!!<P>Doing nothing."
       Response.End
   End If

        items = Split( items, ", " ) ' comma-space
        For inum = 0 To UBound(items)
    SQL = "INSERT INTO WishList (idCustomer, idProduct) " _
         & " VALUES(" & Session("custID") & "," & items(inum) & ")"
           objConn.Execute(SQL)

Next
End If


'####################################################
'# Start deleting selected item
'####################################################

' Did user ask to delete any items from the wishlist?
If Request("DeleteFromWishList") <> "" Then
    ' yep
    items = Request("RemoveItem")
      response.write(items)
      response.end
    If Trim(items) = "" Then
       Response.Write "No products given to us to delete!!<P>Doing nothing."
       Response.End
    End If

  SQL = "DELETE FROM wishlist " _
              & " WHERE idCustomer=" & Session("custID") & " " _
              & " AND idProduct IN ('" & Replace( items, ", ", "','" ) & "')"
    objConn.Execute(SQL)
   response.write SQL
   response.end
End If ' end of if user asked to remove items

Response.Write "<HR>"


'####################################################
'# Start selecting wish list
'####################################################

SQL = "SELECT * FROM wishlist WHERE idCustomer = " & Session("custID") & " "
Set rs = objConn.Execute(SQL)

Response.Write "Getting wishlist: " & SQL & "<HR>"
%>
<FORM>
<TABLE Border=1 CellPadding=5>
<TR>
   <TH>Remove<br/>from list</TH>
   <TH>Product ID</TH>
   <TH>Description</TH>
</TR>

<%
Do While Not rs.EOF
%>
        <TR>
        <TD><INPUT Type=Checkbox Name="RemoveItem" Value="<%=item%>"></TD>
        <TD><%=item%></TD>
        <TD>&nbsp;</TD>
        </TR>
<%
    rs.MoveNext
Loop
rs.Close
objConn.Close
%>
<TR>
    <TD Colspan=3>&nbsp;</TD>
</TR>
<TR>
    <TD>
    <INPUT Type=Submit Name="DeleteFromWishlist" Value="Remove checked items to wishlist">
    </TD>
    <TD>&nbsp;</TD>
    <TD align=right>
    <INPUT Type=Submit Value="Show the list of products" onClick="this.form.action='productChoices.asp'; return true;">
    </TD>
</TR>
</TABLE>
</FORM>
</BODY></HTML>


FtB
0
 
nigermanAuthor Commented:
screen is blank!
0
 
fritz_the_blankCommented:
Okay, that means that no values were passed to the function, and your problems may lie elswhere.

To get your screen back, delete the following lines:

     response.write(items)
     response.end

FtB
0
 
nigermanAuthor Commented:
Thanks for all the assistance.

It is indeed very well appreciated.

If I ever figure this thing out, I'd be sure to come back and let you know.

Glad it is Saturday night, not Sunday night.
0
 
fritz_the_blankCommented:
Okay, best of luck.

At least part of your problem is solved now. You just have to figure out why you are not getting your parameters passed,

FtB
0
 
nigermanAuthor Commented:
it's all solved now!

All I needed to do was add this bit:     item = rs("idProduct")
just below the while loop and all would be well.

I want to give you special thanks for the assistance.

sorry peh803, you been great to me many times before but to the victor goes the spoils.

The day belongs to Fritz as he has spent a lot of time trying to help me solve this.

0
 
fritz_the_blankCommented:
Okay, if you are so happy about this being resolved and you feel that you want to give special thanks, is there any reason for the grade of B here? You had 5-6 questions in one, offered low points, we all spent a lot of time helping...the grade of B seems pretty ungrateful.

As an aside, I am not sure your problem is fixed...if you do item = rs("idProduct") won't that delete all of your products rather than the ones marked for deletion?


FtB
0
 
nigermanAuthor Commented:
hi Fritz,
Sorry that my grade and points left you with the impression that I was ungrateful.

I certainly am very, very grateful for your help.

I think that a grade of B with 250 points was sufficient given that I mostly did the work.

Most people award points based on their problems being solved.

If you look at the many posts I have made here, I award points based on the satisfaction that I get ( and I have gotten a lot of that) that my helper has done whatever is necessary to help me.

I don't believe it happened here.

As for the question of whether you are sure that problem has been fixed, I wont say so if I don't believe so.

If you recall, I had said that the select statement was not displaying anything.
As a result, if you check a box and click delete, I get a message that no data was given to be deleted.

All I needed to do was add rs("IDproduct") under while loop and now, based on the id I just passed, records that have been added to the database are now being displayed and delete can now have records to delete.

Thanks for all the help.
0
 
fritz_the_blankCommented:
If you review the thread and feel that we haven't pointed you in the right direction, helped you to troubleshoot, gave ideas, and etc., then that is fine. I do encourage you to reread EE guidelines regarding points per question in regards to difficulty level and those relating to grading.

Don't bother responding to this as I won't be returning to this thread, but I wanted you to know how this would look to most people who  volunteer time out of busy schedules without compensation to help you out.

FtB
0
 
nigermanAuthor Commented:
I don't want to get recognition as someone who didn't appreciate any help done for him.

Again, my posts here speak for themselves.

There have been times when I have rewarded points to someone just for trying, not for getting it right.

The question I posed here was not for the faint-hearted.

Yes, I am still new to asp but can you imagine someone with less knowledge than I have getting the kind of response I had gotten here?

They would be no where to solving this problem than I am.

Don't forget that threading here costs money. EE leaders can attest to my paying to get points to ask questions.

I have given to, and gotten more efforts from, others in forums where no money is paid to ask questions.

I was a huge database guy before going into asp space and I can say that I have taken so many people's projects home, resolved for them without asking for anything in return.

That is what makes our business so unique - the ability of people like peh803 to offer lots of their times with no strings attached.

I gave him only 25 points but the many helps he has offered me in the past are more than the points can pay for.

All I asking gurus like you is while you don't have any need to buy points (you make enough of it) consider struggling members like us who have to "pay" to get help.

Once people consider that people like me pay to get help, it is very helpful to do whatever you can in good conscience that we are not as fortunate (at least for now) to be as good as you are.

Even if I give you a grade of A and 500 points, it is less important, at least to me, than the satisfaction I feel that someone has gone out their way to assist me or someone else.
0
 
fritz_the_blankCommented:
Look into things before you post.

When I first started here, I knew absolutely nothing. I learned most everything I know first by asking questions here and then by answering them.

Also, keep in mind that EE is not a coding service where you dump projects on people, but rather, where you get help with specific issues or general advice regarding how to approach a problem. Did you do most of the work here yourself? Well that's bloody good! It's your project. We're here to lend a hand when you get stuck, not to do your work for you. If you want that, hire someone on a freelance basis (check the profiles, many experts here do that, and they will do all of the work for you very graciously for a fee) but don't expect that we will code projects for you for a few dollars a month. Get real. If you don't want to pay, then answer enough questions to earn premium services, i.e., give to the community in some way (there are plenty of easy questions to anser). Moreover, don't think for a second that we see any of that monthly pittance you pay; that is just to keep the servers up and running.

Yes, peh803 and I answer all kinds of very difficult 25 point questions when people need help and that is all the points they have. We do it to help out, and in return, most people shoe some modicum of grattitude.

As for your posts speaking for themselves, well yes, indeed this one does; the next time that you need help, I'll be certain to remember what this one says.

FtB
0
 
fritz_the_blankCommented:
So, given your question(s) as stated, my first three responses addressed everything. You then took the opportunity to piggyback a whole set of other issues onto this thread by subsituting a whole new set of code. Not cool, but understandable given where you found yourself. So, once answering your question as it was asked pointed you in a new direction, and you added a whole new set of issues which I helped you to troubleshoot, you turn around and decide that since we didn't code the thing for you that wasn't good enough....

Next time, I'll know better.

FtB
0
 
nigermanAuthor Commented:

How can I change the grade and add more points to your points?.

I think you picked up on the fact that I said I would spend a lot of time doing it for others.

Again, look my previous threads and infact peh803 would attest to this.

I have always preferred to do it myself, or at least try.

That is the way I learn and I have gotten credit for this in the past for not just sitting there and letting someone do it for me.

I don't think that was what the issue was here.

Just so we can move beyond this thread, let me know how I can change the grade.

It is important to me to not leave the impressions that:

1, I like gurus like you to do it for me,
2, if it is not resolved by someone else, they don't get compensated.

No, far from the truth. Like I said before, if you read all my threads here, and there are tons of them, I have actually added extra points to folks who didn't even solve the problem for me.

So, please let me know how I can increase your points and change the grade so we can move on bigger and better things?

I have said all along that the fact the I gave 250 points and a score of B does not diminish the help you gave me and certainly does not take away that you are pretty good at what you do

BTW: you have more points than anyone on this forum...that speaks volume of not only your talents but the help you have offered several people.

A grade of C will not change how people, including myself view your abilities and the help you have offered many, many people here.

I really don't understand what the big issue is here with you?

You *lent* a hand I said thank you and here is 225 points.
Why is this annoying you so much?

If I post next time and you don't feel like assisting, that is part of the choice we make in life; no one, no one will hold it against you.

I have never seen someone take so *personal* the fact that she or he is given 225 points for making suggestions.

If I had given you 500 points and a score of A, all will be well but then I will be fooling you and myself.

If you feel like you have always been a straight A guy and I tainted with a B, if that is what the issue is, let me know and I promise the change the grade to A.

I appreciated your help, giving you a grade of A or D doesn't change that fact.

There are people who come here looking for someone to their jobs for a fee.

There are those who come here, like me looking for assistance that will help them *get started* when they had no clue how to proceed.

If we have the mindset that we won't help with hope of forcing the help-seeking individuals to pay us to do it for them, then we are losing the essential meaning of forums.

Let's move beyond this.
0
 
peh803Commented:
@nigerman:

If you would like to have the grade changed, you can post a request in the community support forum, located here:
  http://www.experts-exchange.com/Community_Support/

While I appreciate your point of view on this question and the grade, I believe Fritz's point is also well taken.  As you mention, he has more points than anyone else in this forum.  This did not happen by accident.  The trust is that FtB goes far above and beyond the "call of duty" and does anything he can to help people find the solution to their problems.  Generally, if someone is able to help you find a solution (whether they explicitly write out the code for you or not), they feel like they deserve the top grade.  Moreover, when the top grade is not given, it is typically accompanied by an explanation of some kind, rather than high praise. :-)  

One final note I would add is that it does not cost you any more points to award a higher grade.  Finally, I doubt it is the question of points here (FtB has more points than he knows what do to with) but rather the fact that he went far above and beyond the call of duty, provided any help you needed until you arrived at your solution, and simply feels that this level of support is deserving of an "A" grade.  Lastly, it is important to understand that the Experts Exchange system is not the same as a typical academic grading system.  To review the guidelines for grading, please see the following link:
   http://www.experts-exchange.com/Web/Web_Languages/ASP/help.jsp#hi73

As always, thanks for your consideration in this matter, and thanks for using Experts Exchange.

Best Regards,

Phil Hamlin
"peh803"
0
 
fritz_the_blankCommented:
Thanks to all for posting.

I do have enough poits, so please save your points in case you need them for another question. As peh803 writes, it has to do more with the sense of appreciation rather than points, or else I wouldn't spend so many hours answering really difficult 25 point questions!

I'll take care of the grade change here.

Best to all,

FtB
0
 
nigermanAuthor Commented:
Fritz, Phil,
I apologize to all if my reasoning is seems faulty and has offended anyone.

You all have been great.

Fritz, like I said, you did not top the list of point earners for nothing.

You did it by helping people solve problems and I did not and will not in any way, shape or form deliberating try to diminish your well-earned respect in this ee commnity.

Thanks for all the service to members of this great community, including myself.

I realize forums, like this one,  is a great tool of learning and being here is helped and will continue to help me continue to grow.

And I promise you to handle these kinds of situations differently.

When I awarded the grade and points, I did it with no malice and no anger, whatsoever; afterall end result is what matters and the end result for me here is that my problem has been solved.

So I awarded the points and grades because I thought it was the right call; now I know better.

So for the last time, I beg you to look beyond what transpired here and continue your great service to ee community.

--sonny
0
 
fritz_the_blankCommented:
Thank you for your kind words!

FtB
0
 
peh803Commented:
@nigerman:

I'm just glad we've got this resolved and you understand now where FtB was coming from.  

As far as moving forward is concenrned, there's no "bad blood" here in my opinion.  It's just that learning how E.E. operates is a learning experience in itself.  I'm sure you will continue to be a valuable asset to the E.E. community, and I look forward to helping you in any way I can with your future questions.

Regards,
peh803
0
 
fritz_the_blankCommented:
Dang! peh803 is one gracious dude!!!

FtB
0
 
nigermanAuthor Commented:
thanks peh803, you are indeed gracious and extremely helpful.

Hopefully, FtB feels the same as you do.
0
 
fritz_the_blankCommented:
Indeed I do.

FtB
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 27
  • 24
  • 5
Tackle projects and never again get stuck behind a technical roadblock.
Join Now