OK, now that I got the function working and I looked in a couple forums and realized I can't do server-side database manipulations in this function, I'm stuck again.
In this function I need to delete records from the database on the server.
This is what I wrote so far:
<% Dim connCW %>
<%...
Hi Todd,
Quick question - I have this button as a column heading of a table and here's how I initialize it:
<TH ALIGN=center><INPUT TYPE=button name=cmdDelete value="Delete" ONCLICK=cmdDelete_Click</TH>
I have a generic sub-routine set up so I can see if the ONCLICK command is...
Hi Todd,
The following code gives me an error that says "Item cannot be found in the collection corresponding to the requested name or ordinal," and refers to the line with the *.
<% set rsSCID = Server.CreateObject("ADODB.Recordset") %>
<% rsSCID.Open...
The variable is actually intID, not initID. I declare it like any other variable:
<% Dim intID, strQuery %>
And then I pick up the max integer in a column of the database like this:
strQuery = "SELECT MAX(scID) FROM shoppingcart"
intID = rsSC.Execute(strQuery)...
OK,
I found that I also need to change the integer back to a string when I pick it up from the database. Seeing the above examples and knowing a little about VB, I tried
Session("scID") = CStr(intID)
and I also tried
myStr = CStr(intID)
Session("scID") = myStr
and...
TW~
I am having a little trouble because I don't know how to change this string to an integer so that I can add a number to it and store it in an integer field of a database. Also, how would I go about displaying this value on the screen? Can I access the variable inside the HTML tags, or...
The only reason the first page is HTML and not ASP is because that's the way my teacher created it. I'm not sure if I can change it, but I don't think she would mind if I had to change it to an ASP page to make the coding easier. I would still like to know how to do it using an HTML page...
Thank you so much for all of your help. This is for a school assignment and my teacher didn't really know why I was having a problem.
If you go to http://csmaster.sxu.edu/snaegele/cougar/cougar.html
this is my .html page. My teacher wrote this page and I need to modify it.
Click on the...
I would like an example of the hidden parameters. I was trying to use something like
<INPUT TYPE=HIDDEN NAME=scID VALUE=<% =scID %>>
and then on the recieving page I put
<% Dim scID %>
<% scID = Request.Form("scID") %>
and once again I think it wasn't working because I am using a...
Thanks for your immediate responses.
I've been playing around with it and realized that I'm trying to do this in a .html page and not an .asp page.
My .html page links to .asp pages and needs to pass this value as a parameter. I really don't know how to do this...Any suggestions?
Hi All,
I hope you can help me... I am very new to ASP and I am trying to declare a variable and initialize the variable to 0. The following is what I've tried in the body of my code:
<% Dim scID %>
<% scID = 0 %>
scID= <% =scID %>
when it displays on the screen scID has a null value. I've...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.