Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Help Groups for Snitz Forums 2000 Users
 Help: MOD Implementation
 SQL error - Recordset
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

EmperorNeo
Starting Member

32 Posts

Posted - 20 June 2003 :  03:04:37  Show Profile
Can anyone tell me what is wrong with this statement? I added the string to make it read the config.asp file but something is still wrong.

//////// Browser Error Message ////////////
Microsoft JET Database Engine error '80040e10'

No value given for one or more required parameters.

polls/inc_short_poll_hot.asp, line 9

///////////Here is the Code ////////////
<%
set rsNewPoll = Server.CreateObject("ADODB.Recordset")
rsNewPoll.ActiveConnection = MM_connPoll_STRING
rsNewPoll.Source = "SELECT * FROM " & strTablePrefix & "QUESTIONS INNER JOIN " & strTablePrefix & "ANSWERS ON " & strTablePrefix & "QUESTIONS.QUEST_ID = " & strTablePrefix & "ANSWERS.QUEST_ID WHERE QUEST_ACTIVE = 1 ORDER BY QUEST_DATED, " & strTablePrefix & "ANSWERS"
rsNewPoll.CursorType = 0
rsNewPoll.CursorLocation = 2
rsNewPoll.LockType = 3
rsNewPoll.Open()
rsNewPoll_numRows = 0
%>

Nikkol
Forum Moderator

USA
6907 Posts

Posted - 20 June 2003 :  04:20:03  Show Profile
my guess is that you need to prefix your other fields in your sql statement with the tablename as well.

Nikkol ~ Help Us Help You | ReadMe | 3.4.03 fixes | security fixes ~
Go to Top of Page

GauravBhabu
Advanced Member

4288 Posts

Posted - 20 June 2003 :  07:12:42  Show Profile
quote:
Originally posted by EmperorNeo


<%
set rsNewPoll = Server.CreateObject("ADODB.Recordset")
rsNewPoll.ActiveConnection = MM_connPoll_STRING
rsNewPoll.Source = "SELECT * FROM " & strTablePrefix & "QUESTIONS INNER JOIN " & strTablePrefix & "ANSWERS ON " & strTablePrefix & "QUESTIONS.QUEST_ID = " & strTablePrefix & "ANSWERS.QUEST_ID WHERE QUEST_ACTIVE = 1 ORDER BY QUEST_DATED, " & strTablePrefix & "ANSWERS"
rsNewPoll.CursorType = 0
rsNewPoll.CursorLocation = 2
rsNewPoll.LockType = 3
rsNewPoll.Open()
rsNewPoll_numRows = 0
%>



You have not specified any name for the second field in the order by clause

ORDER BY QUEST_DATED, " & strTablePrefix & "ANSWERS.COLUMNNAME"


Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.32 seconds. Powered By: Snitz Forums 2000 Version 3.4.07