I'm getting ready to throw this thing out the window.
I'm developing a mod where people can list cars they own or have owned in the past. I have added the needed tables and have verified that they, and the testing data, are in the database.
I'm building a form within the pop_profile.asp page for people to list their cars. The form will use its own handler and redirect the user back to their profile editing page.
The function is called within DisplayProfile, just after the signature editing form.
It's like the code reads "Exit Function" instead of "recordset.open":
FUNCTION CarForm()
DIM rsAutos
RESPONSE.WRITE "<tr>"
RESPONSE.WRITE "<td colspan=""2"">"
RESPONSE.WRITE "Car Form Called! <BR />"
' Get List of current cars
strSQL = "SELECT * FROM " _
& strForumTablePrefix & "MEMBER_CARS " _
& "WHERE MEMBERID = " & MemberID & ";"
RESPONSE.WRITE strSQL & "<br />"
SET rsAutos = SERVER.CREATEOBJECT("ADODB.Recordset")
response.write "Makes an instance of the recordset. <br />"
' \/\/\/ Code behaves like "exit function" right here. \/\/\/
rsAutos.open strSQL, my_conn
response.write "recordset created! <br />"
IF rsAutos.EOF OR rsAutos.BOF THEN
Response.Write "It's Empty! <br />"
ELSE
response.write "we have cars! <BR />"
DO UNTIL rsAutos.EOF
RESPONSE.WRITE "<p>"
RESPONSE.WRITE rsAutos("MEMCAR_ID") & "; "
RESPONSE.WRITE rsAutos("AUTOMOBILE_MODEL") & "; "
RESPONSE.WRITE rsAutos("AUTOMOBILE_YEAR") & "; "
RESPONSE.WRITE rsAutos("AUTOMOBILE_NICK")
RESPONSE.WRITE "</p>"
rsAutos.MOVENEXT
LOOP
END IF
rsAutos.CLOSE
response.write "successfully closed recordset! <br />"
SET rsAutos = NOTHING
' Form for adding another
' I have to build a database populating page
RESPONSE.WRITE "</td>"
RESPONSE.WRITE "</tr>"
END FUNCTION
It seriously just exits right there. I get none of the error messages you'd expect ("Object must be open", etc.) if I comment out the "rsAutos.OPEN strSQL, my_conn" line.
I am down to my last four follicles of hair. Can anyone help?