Wrox Programmer Forums
|
Classic ASP Databases Discuss using ASP 3 to work with data in databases, including ASP Database Setup issues from the old P2P forum on this specific subtopic. See also the book forum Beginning ASP.NET Databases for questions specific to that book. NOT for ASP.NET 1.0, 1.1, or 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Databases 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, 10:49 AM
Authorized User
 
Join Date: Jun 2007
Posts: 17
Thanks: 0
Thanked 0 Times in 0 Posts
Default Microsoft Access link database to ASP

Hi,

Can anyone tell me why my localhost can link 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.



apple
__________________
apple
 
Old July 10th, 2007, 07:38 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 2,189
Thanks: 5
Thanked 59 Times in 57 Posts
Send a message via MSN to gbianchi
Default

hey there.. access always use that error when your query is wrong.. one of the fields you are looking for is not in the table...

HTH

Gonzalo

================================================== =========
Read this if you want to know how to get a correct reply for your question:
http://www.catb.org/~esr/faqs/smart-questions.html
^^Took that from dparsons signature and he Took that from planoie's profile
================================================== =========
My programs achieved a new certification (can you say the same?):
WORKS ON MY MACHINE
http://www.codinghorror.com/blog/archives/000818.html
================================================== =========
I know that CVS was evil, and now i got the proof:
http://worsethanfailure.com/Articles...-Hate-You.aspx
================================================== =========





Similar Threads
Thread Thread Starter Forum Replies Last Post
Microsoft Access Link to ASP apple88 Access ASP 0 July 7th, 2007 08:59 PM
HOW TO LINK ACCESS DATABASE TO ORACLE? pamma_lean Access 1 May 4th, 2005 10:11 AM
Microsoft Access can't open the database because. vinodkalpaka Classic ASP Components 2 August 4th, 2004 06:27 PM
Microsoft Access can't open the database because. vinodkalpaka Classic ASP Databases 2 July 24th, 2004 04:37 PM
INSERT string into a Microsoft Access Database gsolis Classic ASP Databases 1 December 31st, 2003 05:31 PM





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