Microsoft Access Link to ASP
Hi,
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.
apple
apple
__________________
apple
|