472,353 Members | 1,681 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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

Object required error

So I setup my code finally got the connection string (include
utility.asp file) thanks to one of ya'll on here and now I have a new

This is the error I'm getting:

Error Type:
Microsoft VBScript runtime (0x800A01A8)
Object required: 'GetConnection()'
/members/logon.asp, line 45

And here is the code to refer to:

<% @Language=VBScript %>
<% Option Explicit %>
<!-- #include virtual="/inc/utility.asp" -->

' The text for the submit button
const LOGON_ACTION = "Logon..."
const LOGOFF_ACTION = "Logoff..."

Dim sError, bLogon
bLogon = Session("u_name")=""
if Request.Form("action")=LOGOFF_ACTION then
bLogon = true
elseif Request.Form("action")=LOGON_ACTION then
' Logon
Dim sPassword, sName
sName = Trim(Request.Form("u_name"))
sPassword = Trim(Request.Form("u_password"))
if sName="" or sPassword="" then
sError = "<BR>You did not enter a name and/ or password."
Dim oCmd, oConn, oRS
set oConn = GetConnection() <----- where supposedly the error
Set oCmd = GetStoredProcedure(oConn,"sp_logonuser")
oCmd.Parameters.append oCmd.CreateParameter("u_name", adVarChar,
oCmd.Parameters.append oCmd.CreateParameter("u_password",
adVarChar, adParamInput,12,spassword)
set oRS = oCmd.execute()
if oRS.eof then
sError = "<BR>Invalid User Name or Password."
session("u_id") = oRS.fields("u_id")
session("u_name") = oRS.fields("u_name")
session("u_lastdate") = oRS.fields("u_lastdate")
session("u_logcount") = oRS.fields("u_logcount")
bLogon = false
end if
end if
end if
if bLogon then
Response.Write("<P>Logon " & SITENAME & " or <A
HREF=""join.asp"">Join Now</A>.")
if sError<>"" then
Response.Write("<P><B>You were not logged in because:</B><FONT
COLOR=darkred>" & sError & "</FONT>")
end if
Response.Write("<TR><TD>User Name</TD><TD>" &
BuildInput("text","u_name",sName,20,50) & "</TD></TR>")
Response.Write("<TR><TD>Password</TD><TD>" &
BuildInput("password","u_password","",12,12) & "</TD></TR>")
Response.Write("<TR><TD COLSPAN=2>" &
BuildInput("submit","action",LOGON_ACTION,"","") & "</TD></TR>")
Response.Write("<H2>Welcome Back " & session("u_name") & "</H2>")
Response.Write(BuildInput("submit","action",LOGOFF _ACTION,"",""))
end if

Jun 9 '07 #1
0 2104

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

by: Dave Hammond | last post by:
I've got what should be a simple assignment of either an element value or a default string to a variable, but when the element doesn't exist I get...
by: muralidharan | last post by:
WebForm1.aspx Code: <%@ Register TagPrefix="ComponentArt" Namespace="ComponentArt.Web.UI" Assembly="ComponentArt.Web.UI"...
by: Remulac | last post by:
Hello, I'm trying to get the value out of a dropdown list box and assign it to a variable. When I click on the list box, I invoke this line of...
by: Adriano | last post by:
Hello, when I try to print something, either DataGrid or from Crystal Report viever the folowing error message appears and cancels printing: ...
by: Deepak C.G via .NET 247 | last post by:
I want to dispose the image object in my child form, unless I won't dispose this object i can't delete the image file in my folder. I get this...
by: ST | last post by:
Hello everyone, Can anyone help me with this error above when I debug my web app project in vstudio.net?? I can't figure it out! It was working...
by: Don | last post by:
I'm getting the following exception displayed in the task list at design time for my project: "Code generation for property 'Controls' failed. ...
by: ink | last post by:
Hi All I am relatively new to doing this and i think that i am making some king of school boy error. The error i am getting is on the...
by: livmacca | last post by:
Hi, I am new to VB .Net programming and is trying to create a webpage. I encountered the following error and is totally clueless on how to make it...
by: chromis | last post by:
Hi, I've been trying to implement a more OOP oriented approach to dealing with user security on one of my websites, and I am trying to validate...
by: Naresh1 | last post by:
What is WebLogic Admin Training? WebLogic Admin Training is a specialized program designed to equip individuals with the skills and knowledge...
by: jalbright99669 | last post by:
Am having a bit of a time with URL Rewrite. I need to incorporate http to https redirect with a reverse proxy. I have the URL Rewrite rules made...
by: antdb | last post by:
Ⅰ. Advantage of AntDB: hyper-convergence + streaming processing engine In the overall architecture, a new "hyper-convergence" concept was...
by: Matthew3360 | last post by:
Hi there. I have been struggling to find out how to use a variable as my location in my header redirect function. Here is my code. ...
by: Matthew3360 | last post by:
Hi, I have a python app that i want to be able to get variables from a php page on my webserver. My python app is on my computer. How would I make it...
by: AndyPSV | last post by:
HOW CAN I CREATE AN AI with an .executable file that would suck all files in the folder and on my computerHOW CAN I CREATE AN AI with an .executable...
by: WisdomUfot | last post by:
It's an interesting question you've got about how Gmail hides the HTTP referrer when a link in an email is clicked. While I don't have the specific...
by: Oralloy | last post by:
Hello Folks, I am trying to hook up a CPU which I designed using SystemC to I/O pins on an FPGA. My problem (spelled failure) is with the...
by: Carina712 | last post by:
Setting background colors for Excel documents can help to improve the visual appeal of the document and make it easier to read and understand....

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.