error '80040e10' ......

G

Guest

HI,
could anybody please shed some light on this error for me plese, ive been
trying to figure it out for the last few days.... going crazy!!

Im getting the following error:
Microsoft OLE DB Provider for ODBC Drivers error '80040e10'
[Microsoft][ODBC Microsoft Access Driver] Too few parameters. Expected 1.
/Thank_Service_Engineer.asp, line 369


Here's a snipet of my code and the line 369 with the error


Dim adoCon
Dim rsAddComments
Dim strSQL


Session("DatabasePath") = Server.Mappath("complete.mdb")
Set adoCon = Server.CreateObject("ADODB.Connection")

adoCon.Open "DRIVER={Microsoft Access Driver (*.mdb)};" & _
"DBQ=" & Session("DatabasePath") & ";"

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

strSQL="SELECT Reports.ID_no, Reports.Engineer, Reports.DateCompleted,
Reports.Comment, Reports.Hours FROM Reports;"
'strSQL="SELECT * FROM Reports;"

rsAddComments.CursorType = 2
rsAddComments.LockType=3

rsAddComments.Open strSQL, adoCon // error on this line 369

rsAddComments.AddNew
rsAddComments.Fields("ID_no")=Request.Form("ID_no")
rsAddComments.Fields("Engineer")=Request.Form("Engineer")
rsAddComments.Fields("DateCompleted")=Request.Form("DateCompleted")
rsAddComments.Fields("Comment")=Request.Form("Comment")
rsAddComments.Fields("Hours")=Request.Form("Hours")
rsAddComments.Update

on error resume next
adoCon.Execute sql,recaffected

__________________________________________________________________

All suggestions greatly appreciated,

Thanx ; )
 
J

JohnFol

What happens if you execute this in complete.mdb?

SELECT Reports.ID_no, Reports.Engineer, Reports.DateCompleted,
Reports.Comment, Reports.Hours FROM Reports;"

My guess is it can't find one of the fields and hence why it thinks it's a
parameter.
 
G

Gary Walter

Hi AQ,

I'm with John wondering if the sql
would work in just an mdb.

"Reports" is a reserved word in Access,
and while I did not test this, I would think
you would need to wrap it in square brackets
within a sql (or changing the name of the table
might be better).

Does this work?

strSQL="SELECT ID_no, Engineer, DateCompleted, [Comment], [Hours] FROM
[Reports];"

Good luck,

gary
 
G

Guest

Hi JohnFol,
Did what you suggested....

JohnFol said:
What happens if you execute this in complete.mdb?

SELECT Reports.ID_no, Reports.Engineer, Reports.DateCompleted,
Reports.Comment, Reports.Hours FROM Reports;"
but got an error:
Microsoft VBScript compilation error '800a03fd'

Expected 'Case'

/Thank_Service_Engineer.asp, line 363

SELECT Reports.ID_no, Reports.Engineer, Reports.DateCompleted,
Reports.Comment, Reports.Hours FROM Reports;"


The error points to the first Reports after the word SELECT
Any Ideas what I could try next??????
 
G

Guest

Hi Gary,
I tried the query in mdb & no errors were generated, then tried both of the
other ways ie the [] and then renaming the table....but no luck still get the
same error.

Microsoft OLE DB Provider for ODBC Drivers error '80040e10'

[Microsoft][ODBC Microsoft Access Driver] Too few parameters. Expected 1.

/Thank_Service_Engineer.asp, line 369

Any other suggestions??





Gary Walter said:
Hi AQ,

I'm with John wondering if the sql
would work in just an mdb.

"Reports" is a reserved word in Access,
and while I did not test this, I would think
you would need to wrap it in square brackets
within a sql (or changing the name of the table
might be better).

Does this work?

strSQL="SELECT ID_no, Engineer, DateCompleted, [Comment], [Hours] FROM
[Reports];"

Good luck,

gary

AQ" said:
could anybody please shed some light on this error for me plese, ive been
trying to figure it out for the last few days.... going crazy!!

Im getting the following error:
Microsoft OLE DB Provider for ODBC Drivers error '80040e10'
[Microsoft][ODBC Microsoft Access Driver] Too few parameters. Expected 1.
/Thank_Service_Engineer.asp, line 369


Here's a snipet of my code and the line 369 with the error


Dim adoCon
Dim rsAddComments
Dim strSQL


Session("DatabasePath") = Server.Mappath("complete.mdb")
Set adoCon = Server.CreateObject("ADODB.Connection")

adoCon.Open "DRIVER={Microsoft Access Driver (*.mdb)};" & _
"DBQ=" & Session("DatabasePath") & ";"

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

strSQL="SELECT Reports.ID_no, Reports.Engineer, Reports.DateCompleted,
Reports.Comment, Reports.Hours FROM Reports;"
'strSQL="SELECT * FROM Reports;"

rsAddComments.CursorType = 2
rsAddComments.LockType=3

rsAddComments.Open strSQL, adoCon // error on this line 369

rsAddComments.AddNew
rsAddComments.Fields("ID_no")=Request.Form("ID_no")
rsAddComments.Fields("Engineer")=Request.Form("Engineer")
rsAddComments.Fields("DateCompleted")=Request.Form("DateCompleted")
rsAddComments.Fields("Comment")=Request.Form("Comment")
rsAddComments.Fields("Hours")=Request.Form("Hours")
rsAddComments.Update

on error resume next
adoCon.Execute sql,recaffected

__________________________________________________________________

All suggestions greatly appreciated,

Thanx ; )
 
G

Gary Walter

try this
http://www.adopenstatic.com/faq/80040e10.asp

AQ said:
Hi Gary,
I tried the query in mdb & no errors were generated, then tried both of
the
other ways ie the [] and then renaming the table....but no luck still get
the
same error.

Microsoft OLE DB Provider for ODBC Drivers error '80040e10'

[Microsoft][ODBC Microsoft Access Driver] Too few parameters. Expected 1.

/Thank_Service_Engineer.asp, line 369

Any other suggestions??





Gary Walter said:
Hi AQ,

I'm with John wondering if the sql
would work in just an mdb.

"Reports" is a reserved word in Access,
and while I did not test this, I would think
you would need to wrap it in square brackets
within a sql (or changing the name of the table
might be better).

Does this work?

strSQL="SELECT ID_no, Engineer, DateCompleted, [Comment], [Hours] FROM
[Reports];"

Good luck,

gary

AQ" said:
could anybody please shed some light on this error for me plese, ive
been
trying to figure it out for the last few days.... going crazy!!

Im getting the following error:
Microsoft OLE DB Provider for ODBC Drivers error '80040e10'
[Microsoft][ODBC Microsoft Access Driver] Too few parameters. Expected
1.
/Thank_Service_Engineer.asp, line 369


Here's a snipet of my code and the line 369 with the error


Dim adoCon
Dim rsAddComments
Dim strSQL


Session("DatabasePath") = Server.Mappath("complete.mdb")
Set adoCon = Server.CreateObject("ADODB.Connection")

adoCon.Open "DRIVER={Microsoft Access Driver (*.mdb)};" & _
"DBQ=" & Session("DatabasePath") & ";"

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

strSQL="SELECT Reports.ID_no, Reports.Engineer, Reports.DateCompleted,
Reports.Comment, Reports.Hours FROM Reports;"
'strSQL="SELECT * FROM Reports;"

rsAddComments.CursorType = 2
rsAddComments.LockType=3

rsAddComments.Open strSQL, adoCon // error on this line 369

rsAddComments.AddNew
rsAddComments.Fields("ID_no")=Request.Form("ID_no")
rsAddComments.Fields("Engineer")=Request.Form("Engineer")
rsAddComments.Fields("DateCompleted")=Request.Form("DateCompleted")
rsAddComments.Fields("Comment")=Request.Form("Comment")
rsAddComments.Fields("Hours")=Request.Form("Hours")
rsAddComments.Update

on error resume next
adoCon.Execute sql,recaffected

__________________________________________________________________

All suggestions greatly appreciated,

Thanx ; )
 
J

JohnFol

But you have not opened the MDB, created a query and cut'n'paste the SQL in
.. . .

The error you describe looks like the compiler is expecting a Select Case
structure, and not a query
 
G

Guest

Hey Gary,
Thanx for the link bit still no good.... Anything else to try??? Anybody
have any suggestions PLEASE!!!???

Gary Walter said:
try this
http://www.adopenstatic.com/faq/80040e10.asp

AQ said:
Hi Gary,
I tried the query in mdb & no errors were generated, then tried both of
the
other ways ie the [] and then renaming the table....but no luck still get
the
same error.

Microsoft OLE DB Provider for ODBC Drivers error '80040e10'

[Microsoft][ODBC Microsoft Access Driver] Too few parameters. Expected 1.

/Thank_Service_Engineer.asp, line 369

Any other suggestions??





Gary Walter said:
Hi AQ,

I'm with John wondering if the sql
would work in just an mdb.

"Reports" is a reserved word in Access,
and while I did not test this, I would think
you would need to wrap it in square brackets
within a sql (or changing the name of the table
might be better).

Does this work?

strSQL="SELECT ID_no, Engineer, DateCompleted, [Comment], [Hours] FROM
[Reports];"

Good luck,

gary

"AQ" wrote:
could anybody please shed some light on this error for me plese, ive
been
trying to figure it out for the last few days.... going crazy!!

Im getting the following error:
Microsoft OLE DB Provider for ODBC Drivers error '80040e10'
[Microsoft][ODBC Microsoft Access Driver] Too few parameters. Expected
1.
/Thank_Service_Engineer.asp, line 369


Here's a snipet of my code and the line 369 with the error


Dim adoCon
Dim rsAddComments
Dim strSQL


Session("DatabasePath") = Server.Mappath("complete.mdb")
Set adoCon = Server.CreateObject("ADODB.Connection")

adoCon.Open "DRIVER={Microsoft Access Driver (*.mdb)};" & _
"DBQ=" & Session("DatabasePath") & ";"

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

strSQL="SELECT Reports.ID_no, Reports.Engineer, Reports.DateCompleted,
Reports.Comment, Reports.Hours FROM Reports;"
'strSQL="SELECT * FROM Reports;"

rsAddComments.CursorType = 2
rsAddComments.LockType=3

rsAddComments.Open strSQL, adoCon // error on this line 369

rsAddComments.AddNew
rsAddComments.Fields("ID_no")=Request.Form("ID_no")
rsAddComments.Fields("Engineer")=Request.Form("Engineer")
rsAddComments.Fields("DateCompleted")=Request.Form("DateCompleted")
rsAddComments.Fields("Comment")=Request.Form("Comment")
rsAddComments.Fields("Hours")=Request.Form("Hours")
rsAddComments.Update

on error resume next
adoCon.Execute sql,recaffected

__________________________________________________________________

All suggestions greatly appreciated,

Thanx ; )
 
J

JohnFol

AQ, as per the other post

But you have not opened the MDB, created a query and cut'n'paste the SQL in
.. . .

The error you describe looks like the compiler is expecting a Select Case
structure, and not a query





AQ said:
Hey Gary,
Thanx for the link bit still no good.... Anything else to try??? Anybody
have any suggestions PLEASE!!!???

Gary Walter said:
try this
http://www.adopenstatic.com/faq/80040e10.asp

AQ said:
Hi Gary,
I tried the query in mdb & no errors were generated, then tried both of
the
other ways ie the [] and then renaming the table....but no luck still
get
the
same error.

Microsoft OLE DB Provider for ODBC Drivers error '80040e10'

[Microsoft][ODBC Microsoft Access Driver] Too few parameters. Expected
1.

/Thank_Service_Engineer.asp, line 369

Any other suggestions??





:

Hi AQ,

I'm with John wondering if the sql
would work in just an mdb.

"Reports" is a reserved word in Access,
and while I did not test this, I would think
you would need to wrap it in square brackets
within a sql (or changing the name of the table
might be better).

Does this work?

strSQL="SELECT ID_no, Engineer, DateCompleted, [Comment], [Hours] FROM
[Reports];"

Good luck,

gary

"AQ" wrote:
could anybody please shed some light on this error for me plese, ive
been
trying to figure it out for the last few days.... going crazy!!

Im getting the following error:
Microsoft OLE DB Provider for ODBC Drivers error '80040e10'
[Microsoft][ODBC Microsoft Access Driver] Too few parameters.
Expected
1.
/Thank_Service_Engineer.asp, line 369


Here's a snipet of my code and the line 369 with the error


Dim adoCon
Dim rsAddComments
Dim strSQL


Session("DatabasePath") = Server.Mappath("complete.mdb")
Set adoCon = Server.CreateObject("ADODB.Connection")

adoCon.Open "DRIVER={Microsoft Access Driver (*.mdb)};" & _
"DBQ=" & Session("DatabasePath") & ";"

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

strSQL="SELECT Reports.ID_no, Reports.Engineer,
Reports.DateCompleted,
Reports.Comment, Reports.Hours FROM Reports;"
'strSQL="SELECT * FROM Reports;"

rsAddComments.CursorType = 2
rsAddComments.LockType=3

rsAddComments.Open strSQL, adoCon // error on this line 369

rsAddComments.AddNew
rsAddComments.Fields("ID_no")=Request.Form("ID_no")
rsAddComments.Fields("Engineer")=Request.Form("Engineer")
rsAddComments.Fields("DateCompleted")=Request.Form("DateCompleted")
rsAddComments.Fields("Comment")=Request.Form("Comment")
rsAddComments.Fields("Hours")=Request.Form("Hours")
rsAddComments.Update

on error resume next
adoCon.Execute sql,recaffected

__________________________________________________________________

All suggestions greatly appreciated,

Thanx ; )
 
G

Gary Walter

Hi AQ,

I am not an ASP expert...

if this was my project, I would follow
advice/examples from adopenstatic.com as
best as I could.

===================
check my version of MDAC
===================

http://www.adopenstatic.com/faq/80040e10.asp

*** quote ****
MDAC v2.5:

Microsoft JET Database Engine (0x80040e10)
No value given for one or more required parameters.
- OR (for earlier MDACs) -
Microsoft JET Database Engine (0x80040e10)
Too few parameters. Expected 1.
*** quote ****

---> it sounds like you have an "earlier" MDAC

MDAC updates:
http://msdn.microsoft.com/data/mdac/downloads/default.aspx

MDAC Component Checker:
http://www.microsoft.com/downloads/...f6-4a21-4b43-bf53-14332ef092c9&displaylang=en

=================
don't use "magic numbers"
=================

http://www.adopenstatic.com/faq/800a0bb9step2.asp

===========================
use Microsoft.Jet.OLEDB.4.0 provider
===========================
( not : DRIVER={Microsoft Access Driver (*.mdb)};)

http://www.adopenstatic.com/faq/whyOLEDB.asp

http://www.adopenstatic.com/faq/800a0bb9.asp

*** quote ***
Example of the correct use of the Recordset's Open method would be:

strSQL = "SELECT field1, field2 FROM table1"
strConnect = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=c:\db1.mdb"
objRS.Open strSQL, strConnect, adOpenForwardOnly, adLockReadOnly, adCmdText

*** unquote ****

Like I said...I am not an ASP expert.

Maybe asking on an ASP newsgroup would
give you a better response?

good luck,

gary

AQ said:
Hey Gary,
Thanx for the link bit still no good.... Anything else to try??? Anybody
have any suggestions PLEASE!!!???

Gary Walter said:
try this
http://www.adopenstatic.com/faq/80040e10.asp

AQ said:
Hi Gary,
I tried the query in mdb & no errors were generated, then tried both of
the
other ways ie the [] and then renaming the table....but no luck still
get
the
same error.

Microsoft OLE DB Provider for ODBC Drivers error '80040e10'

[Microsoft][ODBC Microsoft Access Driver] Too few parameters. Expected
1.

/Thank_Service_Engineer.asp, line 369

Any other suggestions??





:

Hi AQ,

I'm with John wondering if the sql
would work in just an mdb.

"Reports" is a reserved word in Access,
and while I did not test this, I would think
you would need to wrap it in square brackets
within a sql (or changing the name of the table
might be better).

Does this work?

strSQL="SELECT ID_no, Engineer, DateCompleted, [Comment], [Hours] FROM
[Reports];"

Good luck,

gary

"AQ" wrote:
could anybody please shed some light on this error for me plese, ive
been
trying to figure it out for the last few days.... going crazy!!

Im getting the following error:
Microsoft OLE DB Provider for ODBC Drivers error '80040e10'
[Microsoft][ODBC Microsoft Access Driver] Too few parameters.
Expected
1.
/Thank_Service_Engineer.asp, line 369


Here's a snipet of my code and the line 369 with the error


Dim adoCon
Dim rsAddComments
Dim strSQL


Session("DatabasePath") = Server.Mappath("complete.mdb")
Set adoCon = Server.CreateObject("ADODB.Connection")

adoCon.Open "DRIVER={Microsoft Access Driver (*.mdb)};" & _
"DBQ=" & Session("DatabasePath") & ";"

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

strSQL="SELECT Reports.ID_no, Reports.Engineer,
Reports.DateCompleted,
Reports.Comment, Reports.Hours FROM Reports;"
'strSQL="SELECT * FROM Reports;"

rsAddComments.CursorType = 2
rsAddComments.LockType=3

rsAddComments.Open strSQL, adoCon // error on this line 369

rsAddComments.AddNew
rsAddComments.Fields("ID_no")=Request.Form("ID_no")
rsAddComments.Fields("Engineer")=Request.Form("Engineer")
rsAddComments.Fields("DateCompleted")=Request.Form("DateCompleted")
rsAddComments.Fields("Comment")=Request.Form("Comment")
rsAddComments.Fields("Hours")=Request.Form("Hours")
rsAddComments.Update

on error resume next
adoCon.Execute sql,recaffected

__________________________________________________________________

All suggestions greatly appreciated,

Thanx ; )
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top