Hey everyone,
Well, I just started programming in ASP (With Access DB) and I have a little dilemma here. I have this error in some of my pages:
Provider for ODBC Drivers error '80040e10'
[Microsoft][ODBC Microsoft Access Driver] Too few parameters. Expected 2.
/tenderpaws/testing/list.asp, line 19
What really gets to me is that MOST of the time, it works perfectly. But once in a while, the error will appear. I've been told that it's usually because a wrong field name is used. But I checked that...besides, it wouldn't work at all if that was the case, right?
There are a couple of things that I think could give me some hard time...but I'm not sure. First of all, are the queries case-sensitive in ASP? I did queries before in PLSQL with an Oracle DB, and it didn't matter if I wrote the field names in lower or upper case letters. The other thing that may cause a problem is that I'm doing something like this:
strSQL = "SELECT DISTINCT MOVIES.MOVIE_CD, TITLE
FROM MOVIES ORDER BY MOVIES.MOVIE_CD DESC"
Set rsSQL = objDBConn.Execute(strSQL)
For intCounter = 1 to 5
strSQLRating = "SELECT SUM(RATING) AS SUM_RATING
FROM RATINGS_MOVIES
WHERE MOVIE_CD = " & rsSQL("MOVIE_CD"
.Value
Set rsSQLRating = objDBConn.Execute(strSQLRating)
...
Set rsSQLRating = Nothing
rsSQL.MoveNext
Next
Would the value rsSQL("MOVIE_CD"
.Value return an integer if that is the type of the field in the table?
Well, if anyone can help me at all, I would greatly appreciate it. If there are any questions about my problem, I'll be happy to clarify.
Thanks a bunch guys!
Daph
Well, I just started programming in ASP (With Access DB) and I have a little dilemma here. I have this error in some of my pages:
Provider for ODBC Drivers error '80040e10'
[Microsoft][ODBC Microsoft Access Driver] Too few parameters. Expected 2.
/tenderpaws/testing/list.asp, line 19
What really gets to me is that MOST of the time, it works perfectly. But once in a while, the error will appear. I've been told that it's usually because a wrong field name is used. But I checked that...besides, it wouldn't work at all if that was the case, right?
There are a couple of things that I think could give me some hard time...but I'm not sure. First of all, are the queries case-sensitive in ASP? I did queries before in PLSQL with an Oracle DB, and it didn't matter if I wrote the field names in lower or upper case letters. The other thing that may cause a problem is that I'm doing something like this:
strSQL = "SELECT DISTINCT MOVIES.MOVIE_CD, TITLE
FROM MOVIES ORDER BY MOVIES.MOVIE_CD DESC"
Set rsSQL = objDBConn.Execute(strSQL)
For intCounter = 1 to 5
strSQLRating = "SELECT SUM(RATING) AS SUM_RATING
FROM RATINGS_MOVIES
WHERE MOVIE_CD = " & rsSQL("MOVIE_CD"
Set rsSQLRating = objDBConn.Execute(strSQLRating)
...
Set rsSQLRating = Nothing
rsSQL.MoveNext
Next
Would the value rsSQL("MOVIE_CD"
Well, if anyone can help me at all, I would greatly appreciate it. If there are any questions about my problem, I'll be happy to clarify.
Thanks a bunch guys!
Daph