• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1497
  • Last Modified:

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
0
mtrxpoet
Asked:
mtrxpoet
  • 3
  • 2
  • 2
1 Solution
 
JeiPMCommented:
Since you have Option Explicit set, you'll need to define the variables:

dim comm
dim rs



0
 
mgfranzCommented:
Also, watch your spelling...  This will error;

Set rs = Server.CreateObject("ADODB.Recordset")
comm.ActiveConnection = conn


You probably want this instead;

Set rs = Server.CreateObject("ADODB.Recordset")
comm.ActiveConnection = comm
0
 
mtrxpoetAuthor Commented:
thanks but these both don't seem to get it to work, what else could the problem be?
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
JeiPMCommented:
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
0
 
mtrxpoetAuthor Commented:
sry guys someone got me the ans on another ? i had listed and i didn't realize they were the same problem.
0
 
mtrxpoetAuthor Commented:
oh if your wondering it was instead of comm i had to have a dns string
0
 
mgfranzCommented:
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.
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 3
  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now