Link to home
Start Free TrialLog in
Avatar of mtrxpoet
mtrxpoet

asked on

Microsoft VBScript runtime error '800a01f4'

i get this error when i load my page:
Microsoft VBScript runtime error '800a01f4'

Variable is undefined: 'comm'

/jump.asp, line 8


this is the code to my page:

<%
Option Explicit

%>
<!--#include file ="ensureconnection.inc"-->
<%
If Trim(Request("AuthorAlias")) <> "" Then
 Set comm = Server.CreateObject("ADODB.Command")
 Set rs = Server.CreateObject("ADODB.Recordset")
 comm.ActiveConnection = conn
 comm.CommandType = 4
 comm.CommandText = "DM_SP_SelectAliasIDByAuthorAlias"
 comm.Execute, Request("AuthorAlias")
 rs.Open comm
 If rs.EOF = False Then
  If (Request("Type") = "GotoTOC") Then
   Response.Redirect("toc.asp?AuthorAliasID=" & rs.Fields("AliasID"))
  Else
   Response.Redirect("editrelationship.asp?AuthorAliasID=" & rs.Fields("AliasID"))
  End If
 Else
%>
<!--#include file ="redirectlast.inc"-->
<%
 End If
 rs.Close
 Set rs = Nothing
 Set comm = Nothing
End If
%>

please help
Avatar of JeiPM
JeiPM

Since you have Option Explicit set, you'll need to define the variables:

dim comm
dim rs



ASKER CERTIFIED SOLUTION
Avatar of Mark Franz
Mark Franz
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of mtrxpoet

ASKER

thanks but these both don't seem to get it to work, what else could the problem be?
Are you still getting the same error?  If you are, did you make the changes mgfranz suggested:

Change To:
comm.ActiveConnection = comm

You have:
comm.ActiveConnection = conn
sry guys someone got me the ans on another ? i had listed and i didn't realize they were the same problem.
oh if your wondering it was instead of comm i had to have a dns string
As I said, you have the comm set to conn.  

Once you learn how to spell, declare and follow variable naming conventions you will be better off.