Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Object required: '' 2

Status
Not open for further replies.

PhatH

IS-IT--Management
Mar 30, 2004
88
US
Hello all,

I really don't know where this error is about

Microsoft VBScript runtime (0x800A01A8)
Object required: ''
/includes/subnav/products_subnav.asp, line 3

My first few line of code are:

<%
sqlHots = "SELECT ShortName, ProductID, ManuID, ProdTypeID FROM tblProducts WHERE New = 1"
Set rsHot = objConn.Execute(sqlHots)
%>
<div id="navlist">
<table cellpadding="0" cellspacing="0" bgColor=#dbdbdb>
<tr><td height=10></td></tr>
<tr valign="top">
<td vAlign=top align=left width=170>
<font face="Arial, Helvetica, sans-serif"><b>Hardware</b></font>
<ul>

And the line 3 is pointing to this line:
Set rsHot = objConn.Execute(sqlHots)

I looked all over and couldn't think of why. Someone help?

P.S.

"SELECT ShortName, ProductID, ManuID, ProdTypeID FROM tblProducts WHERE New = 1"

New column is holding data in "bit"

thanks!
 
DO you have the objConn set in your code.

I mean something like this:

SET objConn= Server.CreateObject(ADODB.Connection)

-VJ
 
Are you instantiating your Connection Object? Are there any lines of code prior to (or in) the include that kind of go?:
Code:
SET objConn = Server.CreateObject("ADODB.CONNECTION")
Conn.Open WhateverYourConnectionStringMightBe
That's kind of the key. No connection object, no connection = error message - Object Required.
 
here is my dbconn.asp

Set objConn = Server.CreateObject("ADODB.Connection")
objConn.Open "Driver={SQL Server};" &_
"Server=**;" &_
"Database=**;" &_
"Network=**;" &_
"Uid=**;" &_
"Pwd=**;
 
I'm assuming that ** doesn't really mean "**". Try the native OLEDB Provider:
Code:
myConnString ="Provider=sqloledb.1;" & _ 
           "Data Source=myServerName;" & _
           "Initial Catalog=myDatabaseName;" & _
           "User Id=myUsername;" & _
           "Password=myPassword"
Set objConn = Server.CreateObject("ADODB.Connection")
objConn.Open myConnString
IF that doesn't work then you have some permissions issues.
 
:)
AHA!!!

Thank you for reminding me to link the dbconn file to this page.

I thought I did on the main page because this page is a portion of the larger main page. But I was wrong.

Thank you guys. :)
 
Thanks for the star but I think you solved your own problem when you typed "here's my dbconn.asp". Anyway, as a rule you should go with the native OLEDB provider. Happy ASPing. :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top