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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

VBScript runtime error - Object Required

Status
Not open for further replies.

Gatchaman

Programmer
Jan 21, 2003
71
AU
Hi, all, I have a page that I'm getting an error on, this is the error:

Error Type:
Microsoft VBScript runtime (0x800A01A8)
Object required: ''
/possum_test/src/web_site/windows/user/forum/utils/forum/f_post_case.asp, line 22

lines 20-23 are as follows:

Code:
DIM DB
DB = Server.CreateObject ("ADODB.Connection")
DB.ConnectionString=("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.mappath("../../../../../Login/possumweb.mdb"))
DB.Open

Just wondering if anyone would be able to shed some light on to why I'm getting this error ?

Thanks in advance,

Damon
 
I suspect the primary reason is that you want DB to be an object ("Server.CreateObject") but you are assigning it as if a variable. Try instead
Set DB = Server.CreateObject ("ADODB.Connection")

If you still get problems, check that interesting navigation back up through your folder hierarchy is correct!

HTH. - Mike -
 
:) Thanks for the help, I wrote the page using javascript instead of vbscript in the first place, then changed it over and forgot that bit.

Just realised now while I'm writing a reply to another thread that you have to do that . . . works now, but I'll give you the credit.

Thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top