Here's a simple example using CDONTS as your email component:
<%
If Request.Form("Email_It") = "yes" Then
Call sendMail(Request.Form("Email_Address"))
Else
%>
<Form method="post" name="Email" action="thispage.asp">
<input...
Password is a reserved word.
Could also be an error if your variable strUserName is empty.
add
response.write strSQL
before
objRS.Open strSQL, objConn
to see what is actually passed into your sql statement.
your result ends up in sLastRMA, but you set the value of your formfield to iLastRMA.......
try changing
<input type="text" name="textfield" value="<%=iLastRMA%>">
to
<input type="text" name="textfield" value="<%=sLastRMA%>">
if...
unless you have another recordset that you're not showing, you need to access the same recordset that you created in your code. and the only field you selected in that recordset is RMAnum, so you have to use the same field name. unless, as i said, there's more code that you aren't...
also, i think you need to convert to numeric BEFORE you increment by 1:
'** convert the string to an int and add "1" to the value
sLastRMA = CStr(CInt(iLastRMA) + 1)
found this at the ASPEmail site, thought it might shed some light on your problem ronijack:
When running the SendMail.asp sample application, I always receive the following error message. What does it mean and how can I fix it?
Microsoft VBScript runtime error '800a01a8'
Object required...
i'm not real good with sql server, but maybe you can create stored procedures and run those, try posting on the sql server forum to get more info on that. i think that will greatly improve speed and streamline your code too.
can you post how your <input> tag is formatted? i don't understand how you get 4, 5. If 500 is overwritten with 400, then it should submit 400 in the form.....
what is myArray1? do all 3 arrays have the same number of elements? to be safe, i would loop thru each of the 2 arrays individually, which you're doing anyway....
dim max_val
max_val = 0
For i = 0 to UBound(myArray2)
If (max_val < myArray2(i)) Then
max_val = myArray2(i)
End If
Next...
dim lastname
lastname = "O'Mally"
rst.Open "SELECT * FROM Person WHERE LastName='" & lastname & "';"
to store it in the db:
conn.execute "UPDATE Person SET LastName='" & Replace(lastname, "'", "''") & "';"
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.