Author |
Topic |
Chiz
Junior Member
245 Posts |
Posted - 15 April 2002 : 12:23:22
|
I'm testing a modification to the code that constantly causes the following error: quote: Microsoft JET Database Engine error '80040e10'
No value given for one or more required parameters.
The code is rather simple and I don't see any problem on it.
strSQL = "SELECT Col1, Col2 FROM " & strTablePrefix & "TestTable"
set rsTest = Server.CreateObject("ADODB.Recordset") rsTest.open strSql, my_Conn (<-- this causes the error)
I already checked some threads but it didn't solve the problem either.
I've checked the Microsoft site but the IIS search is temporarily disabled.
What could the problem be? Using the Execute method didn't do well either. Should I use GetRows() instead? I'm beginning to think this is server-related problem.
I appreciate any help. Thanks, guys.
My websites: PalmVenue :: PV Mobile My Snitz MODs: Categorized Icons
Edited by - Chiz on 06 May 2002 08:10:42 |
|
ruirib
Snitz Forums Admin
Portugal
26364 Posts |
Posted - 15 April 2002 : 12:33:02
|
Please post here the value of the strSQL variable, just before opening the recordset.
------------------------------------------------- Installation Guide | Do's and Dont's | MODs |
|
|
Chiz
Junior Member
245 Posts |
Posted - 15 April 2002 : 12:41:44
|
Basically this is the content of the strSql variable:
strSQL = "SELECT TipID, Tip FROM " & strTablePrefix & "TipsSettings"
I didn't use a Dim statement for strSQL. Do you think this has an effect?
Thanks for the help, ruirib.
My websites: PalmVenue :: PV Mobile My Snitz MODs: Categorized Icons
|
|
|
ruirib
Snitz Forums Admin
Portugal
26364 Posts |
Posted - 15 April 2002 : 12:46:54
|
quote:
Basically this is the content of the strSql variable:
strSQL = "SELECT TipID, Tip FROM " & strTablePrefix & "TipsSettings"
You are sure your FORUM_tipsSettings table has these two fields?
quote:
I didn't use a Dim statement for strSQL. Do you think this has an effect?
Nah. If there was a problem it would be a syntax error
quote:
Thanks for the help, ruirib.
No problem. You are welcome.
------------------------------------------------- Installation Guide | Do's and Dont's | MODs |
|
|
Chiz
Junior Member
245 Posts |
Posted - 15 April 2002 : 12:57:08
|
quote: You are sure your FORUM_tipsSettings table has these two fields?
Yup. I even tried hard coding the SQL statement by using
rsTest.open "SELECT TipID, Tip FROM FORUM_TipsSettings", my_Conn
I even tried using * in the SELECT statement just to make sure all the columns are returned.
This error is really weird. While there are so many SELECT statement all throughout Snitz code, I wonder why this particular statement causes the error.
BTW, I even used Response.write strSql just to make sure my SQL statement is correct but still I get the error.
Thanks for helping me on this one, ruirib. I really appreciate it.
My websites: PalmVenue :: PV Mobile My Snitz MODs: Categorized Icons
|
|
|
ruirib
Snitz Forums Admin
Portugal
26364 Posts |
Posted - 15 April 2002 : 13:16:58
|
I can't see what you are doing wrong... Is the connection properly opened (my_conn)? Sorry if this all sounds stupid?
------------------------------------------------- Installation Guide | Do's and Dont's | MODs |
|
|
ruirib
Snitz Forums Admin
Portugal
26364 Posts |
Posted - 15 April 2002 : 13:33:09
|
Chiz,
That being an Access database I would recommend that you open the database in Access and create the query you need in the QBE. Execute it and assure that it works as expected. Then just get the SQL from the SQL View and paste it in your ASP script.
------------------------------------------------- Installation Guide | Do's and Dont's | MODs |
|
|
Chiz
Junior Member
245 Posts |
Posted - 16 April 2002 : 00:14:15
|
quote: Is the connection properly opened (my_conn)? Sorry if this all sounds stupid?
Yup. I'm using the my_conn variable that's being used all throughout Snitz code. No, it doesn't sound stupid, ruirib. It's just that this error is weird.
quote: That being an Access database I would recommend that you open the database in Access and create the query you need in the QBE. Execute it and assure that it works as expected. Then just get the SQL from the SQL View and paste it in your ASP script.
I'm sure that there is no problem with my SQL statement. The errors sometimes show and most of the times not.
I'm doing a net search and apparently many are experiencing the same problems. Not enough info on Microsoft site, I may add.
Do you think using a stored procedure/pre-defined query could do the trick?
Once, again, thank you very much for your help ruirib.
My websites: PalmVenue :: PV Mobile My Snitz MODs: Categorized Icons
Edited by - chiz on 16 April 2002 00:28:44 |
|
|
ruirib
Snitz Forums Admin
Portugal
26364 Posts |
Posted - 16 April 2002 : 05:49:04
|
quote:
Do you think using a stored procedure/pre-defined query could do the trick?
It could help yes. I've never experienced anything like it. So try it, there is nothing to lose in doing it.
quote:
Once, again, thank you very much for your help ruirib.
You are welcome.
------------------------------------------------- Installation Guide | Do's and Dont's | MODs
Edited by - ruirib on 16 April 2002 05:49:34 |
|
|
Chiz
Junior Member
245 Posts |
Posted - 16 April 2002 : 07:00:19
|
I've just converted the SQL statement to reference a stored procedure. Upon initial testing, I myself don't encounter the problem *yet* but real verdict relies on the forum members.
OK. Assuming that *that* really did the trick, does the dbs scripting support creation of stored procedures or is limited to creation of tables and records only?
Sorry, ruirib. I'm full of questions today. Thanks.
My websites: PalmVenue :: PV Mobile My Snitz MODs: Categorized Icons
|
|
|
ruirib
Snitz Forums Admin
Portugal
26364 Posts |
Posted - 16 April 2002 : 07:10:51
|
Chiz,
Sorry, but I can't answer that one. I never used dbs scripting so I don't know what to tell ya. Maybe someone else...
<edit>I would assume that it doesn't support stored procedures however. It's just a hunch, really, but yhe reasoning is this: table and record creation is done through "normal" SQL instructions. And I'd say that stored procedure creation is not done through SQL. I may be wrong, though...</edit> ------------------------------------------------- Installation Guide | Do's and Dont's | MODs
Edited by - ruirib on 16 April 2002 07:17:34 |
|
|
Chiz
Junior Member
245 Posts |
Posted - 16 April 2002 : 08:36:27
|
quote: Sorry, but I can't answer that one. I never used dbs scripting so I don't know what to tell ya. Maybe someone else...
No problem at all, ruirib. Anyway, it can be done by a separate .asp file so it's ok.
BTW, since we have been involved in this problem, I will keep you posted if the fix really did the trick. Thanks for your help.
My websites: PalmVenue :: PV Mobile My Snitz MODs: Categorized Icons
|
|
|
ruirib
Snitz Forums Admin
Portugal
26364 Posts |
Posted - 16 April 2002 : 09:01:39
|
quote:
BTW, since we have been involved in this problem, I will keep you posted if the fix really did the trick. Thanks for your help.
My websites: PalmVenue :: PV Mobile My Snitz MODs: Categorized Icons
Sure. Post it here.
And you are welcome .
------------------------------------------------- Installation Guide | Do's and Dont's | MODs |
|
|
Chiz
Junior Member
245 Posts |
Posted - 24 April 2002 : 10:24:23
|
It has been more than a week now and our forum members didn't encounter any error after I did the fix. Maybe stored procs are efficient after all.
My websites: PalmVenue :: PV Mobile My Snitz MODs: Categorized Icons
|
|
|
ruirib
Snitz Forums Admin
Portugal
26364 Posts |
Posted - 24 April 2002 : 13:09:53
|
quote:
It has been more than a week now and our forum members didn't encounter any error after I did the fix. Maybe stored procs are efficient after all.
My websites: PalmVenue :: PV Mobile My Snitz MODs: Categorized Icons
Stored procedures are indeed a more efficient way to execute SQL statements as the SQL is pre-compiled and thus executes faster. Anyway you should upgrade your driver to an OLEDB one. Probably that could have fixed the problem but it still can make your forum run faster...
------------------------------------------------- Installation Guide | Do's and Dont's | MODs |
|
|
Chiz
Junior Member
245 Posts |
Posted - 28 April 2002 : 12:28:06
|
Oooops... Just when I thought that SPROCS did the trick, a member reported the same error. I'm really getting frustrated with this weird error.
It usually happens when the site is busy with many users logged in at the same time.
quote: Anyway you should upgrade your driver to an OLEDB one. Probably that could have fixed the problem but it still can make your forum run faster...
I think I'm already using an OLEDB driver. Im using this as my connection string:
strConnString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=..."
Now I'm trying with all the parameters and options in the Open method of the recordset object. Maybe I might get the right combination.
Just seen milki's post regarding this same problem at this thread. Now it's not only me, I guess.
My websites: PalmVenue :: PV Mobile My Snitz MODs: Categorized Icons
Edited by - Chiz on 28 April 2002 12:32:24 |
|
|
Topic |
|