Wrox Programmer Forums
|
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning ASP 3.0 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old June 2nd, 2004, 12:33 PM
Authorized User
 
Join Date: Mar 2004
Posts: 84
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to gmoney060 Send a message via MSN to gmoney060
Default Microsoft VBScript runtime error '800a01a8'

I changed some stuff, but now i have another error, that i can't figure out. please help!?

Microsoft VBScript runtime error '800a01a8'

Object required: '[string: "Provider=Microsoft.J"]'

/testing/index.asp, line 8

<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<% Option Explicit %>
<%
Dim news_recordset
Dim news_recordset_numRows
Dim objCon

Set objCon = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" & _
            Server.MapPath("/testing/News.mdb")
Set news_recordset = Server.CreateObject("ADODB.Recordset")
news_recordset.Source = "SELECT tdcdate, tdcmessage FROM news_messages ORDER BY tdcdate DESC"
news_recordset.ActiveConnection = objCon
news_recordset.CursorLocation = 2
news_recordset.CursorType = 0
news_recordset.LockType = 1
news_recordset.Open()

news_recordset_numRows = 0
%>

 
Old June 2nd, 2004, 01:18 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Hi there,

You can't use Set to assign a string to a variable. You should use Set for Objects only. So I guess you need something like this:

Dim objConn
Dim connString
Set objConn = Server.CreateObject("ADODB.Connection")
connString = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" & _
            Server.MapPath("/testing/News.mdb")
objConn.Open connString

HtH,

Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.





Similar Threads
Thread Thread Starter Forum Replies Last Post
VBScript runtime error '800a01a8' - FIXED buddyz Classic ASP Databases 2 September 13th, 2006 10:55 AM
Microsoft VBScript runtime error '800a01a8' Abbas Classic ASP Basics 1 July 21st, 2006 11:43 AM
Microsoft VBScript runtime error '800a01a8' Abbas Classic ASP Professional 1 July 21st, 2006 11:42 AM
Microsoft VBScript runtime error '800a01a8' object stevesole Access ASP 9 June 7th, 2004 08:13 PM
Microsoft VBScript runtime error '800a01a8' dlgee Classic ASP Basics 4 January 25th, 2004 05:18 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.