Wrox Programmer Forums
Access ASP Using ASP with Microsoft Access databases. For Access questions not specific to ASP, please use the Access forum. For more ASP forums, please see the ASP forum category.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access ASP 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 July 7th, 2007, 08:59 PM
Authorized User
Join Date: Jun 2007
Posts: 17
Thanks: 0
Thanked 0 Times in 0 Posts
Default Microsoft Access Link to ASP


Can anyone tell me why my localhost cant link to database

Error Message : # Error Type:
Microsoft OLE DB Provider for ODBC Drivers (0x80040E10)
[Microsoft][ODBC Microsoft Access Driver] Too few parameters. Expected 1.
/OUM/comment.asp, line 148

Here is my coding :

Dim adoCon 'Holds the Database Connection Object
Dim rsAddComments 'Holds the recordset for the new record to be added to the database
Dim strSQL 'Holds the SQL query for the database

Set adoCon = Server.CreateObject("ADODB.Connection")

'adoCon.Open "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=C:\Inetpub\wwwroot\hub\comments.mdb"

adoCon.Open "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath("comment.mdb")

Set rsAddComments = Server.CreateObject("ADODB.Recordset")

strSQL = "SELECT tblComments.Path,tblComments.Comments FROM tblComments;"

rsAddComments.CursorType = 2

rsAddComments.LockType = 3

rsAddComments.Open strSQL, adoCon -----ERROR MESSAGE LINE 148

Hope to hear from u soon. Thanks.



Similar Threads
Thread Thread Starter Forum Replies Last Post
Microsoft Access link database to ASP apple88 Classic ASP Databases 1 July 10th, 2007 07:38 AM
ODBC Microsoft Access wehave74 Java Databases 1 January 29th, 2007 01:25 PM
Autonumber in Microsoft Access ozzii Classic ASP Databases 1 January 17th, 2007 04:08 PM
[Microsoft][ODBC Microsoft Access Driver] Syntax e chinedu Classic ASP Databases 3 November 18th, 2004 03:48 PM
Microsoft Works to Microsoft Access lryckman Access 4 April 12th, 2004 03:17 PM

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