473,395 Members | 1,763 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Variable is undefined: 'OpenConn' VBScript runtime error '800a01f4'

Hi,

Can someone help me with this scripts, it works on a different server but gives me error now,

This is the error I now get
Microsoft VBScript runtime error '800a01f4'

Variable is undefined: 'OpenConn'

/customer/authenticate.asp, line 17

Expand|Select|Wrap|Line Numbers
  1. <%@LANGUAGE="VBScript"%>
  2. <%OPTION EXPLICIT%>
  3. <%Response.Buffer = true%>
  4. <!--#Include file="includes/utilities.asp"-->
  5. <%    ON ERROR GOTO 0
  6.     ''-----------------------------------------------
  7.     '' Login page for simple ASP validation
  8.     ''-----------------------------------------------
  9.     Dim UserId, Password
  10.     UserID = Trim(Request.Form("UserID"))
  11.     Password = Request.Form("Password")
  12.     VerifyUser UserID, Password   ''''USER-CREATED SUB
  13.  
  14. '''==================================================
  15. SUB VerifyUser (UserID, Password)
  16.     Dim objConn, sql, rs
  17.     Set objConn = OpenConn()
  18.  
  19.     sql = "SELECT * FROM tblClients WHERE UserID = '" & UserID & "'"
  20.     Set rs = Server.CreateObject("ADODB.Recordset")
  21.     Set rs = objConn.Execute(sql,,1)
  22.  
  23.     If rs.EOF and rs.BOF Then
  24.         '''Error! User Not found
  25.         CleanUp rs
  26.         CleanUp objConn
  27.         Response.Redirect "cbaLoginError.asp"
  28.     Else
  29.         If rs("Pass") <> Password Then
  30.         ''''Oops!! Incorrect Password ----------
  31.             CleanUp rs
  32.             CleanUp objConn
  33.             Response.Redirect "LoginError.asp"
  34.         Else
  35.             ''Checking if the account has been created.
  36.             if(rs("CreateStatus")=1 OR rs("Status")= 2) then
  37.                 Response.Redirect "AccountDisabled.asp"
  38.             end if
  39.             ''-----------------------------------------
  40.             Session("UserID") = UCase(rs("UserID"))
  41.             'Session("UserAccess") = CInt(rs("AccessLevel"))
  42.             Response.Redirect "custHome.asp"    ''always, for all accesslevels!
  43.             ''''' Logins audit code here -----------------
  44.             ''IF CInt(rs("AccessLevel"))=77 THEN
  45.             '    Response.Redirect "includes/msg.asp?msg=<tr><td>You do not have permission to log into the CMS System</td></tr>"
  46.             'ELSE
  47.             '    Response.Redirect "Home.asp"    ''always, for all accesslevels!
  48.             'END IF
  49.             '''---------------------------------------------
  50.         End If
  51.         CleanUp rs
  52.         CleanUp objConn
  53.     End If
  54.     CleanUp rs
  55.     CleanUp objConn
  56. END SUB
  57. '''===================================================
  58. %>
Nov 13 '08 #1
3 9403
jhardman
3,406 Expert 2GB
Expand|Select|Wrap|Line Numbers
  1.     Set objConn = OpenConn()
  2.  
This line doesn't make sense. It should be more like this:
Expand|Select|Wrap|Line Numbers
  1. set objConn = server.createobject("adodb.connection")
OpenConn() doesn't mean anything, as far as I know, and the error just means that the server couldn't figure out what it meant either. Perhaps it refers to something in the global.asa file that was not transferred to this server. Now that I think of it, there is more code missing since there is no indication here that you have opened the db connection or specified where you want to connect. Check the global.asa file from the previous server and see if there is a function called OpenConn() that you can copy over.

Jared

BTW, please put your code in code tags, there is a button marked # provided
Nov 13 '08 #2
Thanks, i have been able to figure it out.

The OpenConn function statement in the includes\utilities.asp file is missing, added the statement and script running fine.

Thanks
Nov 14 '08 #3
jhardman
3,406 Expert 2GB
glad you found it.

Jared
Nov 14 '08 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

10
by: | last post by:
I am accessing the same error-containing ASP page on an ISP server using w2k IE6 but with different effect. On the first computer I get several line of HTML outputed by ASP, shown correctly by...
3
by: Mike Kanski | last post by:
I get this error Microsoft VBScript runtime error '800a01fb' When i call LoadPicture method, or when i pretty much do any operation with PictureBox like setting width and height. It happened...
4
by: Shane | last post by:
Hi, all of a sudden my simple page that calling a small database returns the following: Microsoft VBScript runtime error '800a01f4' Variable is undefined: 'IIf' /wilcox/index.asp, line 156...
1
by: PaulieS | last post by:
Hi all. Am migrating a customer from IIS5 on W2K server to IIS6 on W2K3. Zipped all the websites and unzipped them to the identical locations on new server. Used IISMT to migrate metabase. ...
2
by: anidmarty | last post by:
Hey I'm a Sysadmin and my users are getting this error on my production box. It works fine on the dev box. There is a script that is run that generates this error. Production is clustered...
5
by: Weenizzle | last post by:
I'm new at VB. My friend actually coded this and he's away for awhile. I've been sitting for awhile trying to figure out what I've done wrong. I'm decent at web design but not with VB. Please help! ...
0
by: =?Utf-8?B?TWF0dCBDYWxob29u?= | last post by:
HI there, I am getting an error on my page which calls up a web service. Microsoft VBScript runtime error '800a13ba' Unknown runtime error: 'SearchQueryXML' /SearchResults.asp, line 142
1
by: morrisqueto | last post by:
Hello, One of my websites just started sending a new rare error. The site has been working for almost 2 years without trouble, but today morning started giving away this error in all my views. ...
3
drhowarddrfine
by: drhowarddrfine | last post by:
I've been running this VBScript, gracefully written by InsertAlias, for two days now and it's been perfect. Tonight, for no reason at all, it fails with this error: Windows Script Host Line:7...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.