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...
...is RMAnum, so you have to use the same field name. unless, as i said, there's more code that you aren't displaying....
try these changes:
'** get iLastRMA from the database
rsLastRMAnum.Movelast
iLastRMA = rsLastRMAnum("RMAnum")
iLastRMA = mid(iLastRMA, 9)
sLastRMA...
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, "'", "''") & "';"
oh, yeah. sorry about that......
speed issues:
are they large databases/tables? are your queries returning a large amount of data? the server(s) that the databases reside on, are they overly busy?
If speed is an issue, then I'll repeat what I mentioned in your first post on this issue:
I also think that you can combine this into one select statement:
sql = "SELECT DISTINCT [RepGenA].[filename], EstablishmentID, DfEE, EstablishmentName FROM RepGenA, Establishments WHERE...
<TD BORDERCOLOR=#c0c0c0 nowrap><FONT SIZE=2 FACE="Arial" COLOR=#000000><a href="./viewschool.asp?Establishment=<%=Server.HTMLEncode(EstablishmentID)%>"><%=Server.HTMLEncode(DfEE)%>, <%=Server.HTMLEncode(establishmentname)%></A><BR></FONT></TD>
that should work. you can...
instead of your
do while not recordset.eof
.....
loop
use the
dim i, EstablishmentID, DfEE, EstablishmentName
for i=0 to UBound(arrRows,2)
EstablishmentID = arrRows(0,i)
DfEE = arrRows(1,i)
EstablishmentName = arrRows(2,i)
'then add your 2nd recordset code in here.......
next
is...
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.