No value given for one or more required parameters.

Here we go :) - my programmer is gone so I am stuck.  I am getting this error:

No value given for one or more required parameters.

/classregistration/include/Query.asp, line 28


<%
class Query
      Private sqlString, comm, rs

      Private Sub Class_Initialize()
            Set comm = Server.CreateObject("ADODB.Command")
      End Sub
      
      Private Sub Class_Terminate()
            set rs = nothing
            set comm = nothing
      End Sub

      Public Property Let SQL(newValue)
            sqlString = newValue
      End Property

      public function Execute()
            Dim DBMan
            Set DBMan = new DBManager
    If DBMan.OpenDataBaseConnection() Then
      comm.ActiveConnection = DBMan.DB_Connection
      comm.CommandType = adCmdText
      comm.CommandText = sqlString
      comm.CommandTimeout = 0
      Set rs = Server.CreateObject("ADODB.Recordset")
      rs.CursorLocation = adUseClient
      rs.Open comm
    End If
            Set DBMan = Nothing
      end function

      Public Property Get Result()
            set Result = rs
      End Property
end class

Function ExecuteSQL(SQL)
      dim qry
      Set qry = new Query
      qry.SQL = SQL
      qry.Execute
      set ExecuteSQL = qry.Result
End Function

Function ExistsSQL(SQL)
      dim rs, qry
      Set qry = new Query
      qry.SQL = SQL
      qry.Execute
      ExistsSQL = not qry.Result.eof
End Function
%>

Line 28 is:
rs.Open comm
Now I am sure that it might not be pulling some of the information properly but I have no idea where to start / look.

Thanks!

-Corey
LVL 29
coreybryantAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

alorentzCommented:
Where is this function being called - ExecuteSQL(SQL)

The SQL is what we need to see, and the table structured of the target table.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
coreybryantAuthor Commented:
Is that from the previous page?  I mean - when I click on the link to get to the above page - this is the error.  

-Corey
0
coreybryantAuthor Commented:
Here is the previous page:
<!-- #include file="include/header.asp" -->
<%
CheckPermissionCMS(SITEOWNER)

dim op, sid, lid, id, rs, locationName, message, errmessage, all, monthid, sessid
op = Request.QueryString("op")
all = Request.QueryString("all")
id = Request.QueryString("id") 'member ID
sid = Request.QueryString("sid") 'session ID
lid = Request.QueryString("lid") 'location ID
monthid= Request.QueryString("monthid") 'month
sessid= Request.QueryString("sessionid") 'month
If op="delmonth" Then
      if not isNumeric(monthid) or monthid ="" then
            rw "Script error ... no month selected"
            re
      end if      
      DeleteMonth monthid ,lid ' month and location
      monthid=month(now)
      op=""
End if

If op="delsess" Then
      if not isNumeric(sessid) or sessid ="" then
            rw "Script error ... no session selected"
            re
      end if
      DeleteSession sessid ' session
'      monthid=month(now)
      op=""
End if


if not isNumeric(monthid) or monthid ="" then
      monthid=month(now)
end if
if not isNumeric(lid) or lid="" then
      lid = GetFirstLocationID
      if lid = 0 then
            rw "Please create a location first"
            re
      end if
end if

locationName = GetLocationDetail(lid).LocationName

if op = "reg" then
      if not isNumeric(id) or id = "" then
            rw "Invalid Member ID:" & id
            re
      end if      
      if not isNumeric(sid) or sid="" then
            rw "Invalid session ID"
            re
      end if
      RegisterSession sid, id
      rw "email: free slot for first waiting member"
      SendFreeSlotMessage id, sid
end if
            
'if op = "add" then
      'res = DeactivateSession(sid)
      'if res = errNoErrors then
            'message = "Session was successfully deactivated."
      'else
            'errmessage = msgUnknownErr
      'end if
'end if
'If all=0 Then
'      set rs = GetSessionList(lid)
'else
'      set rs = GetSessionListAll(lid)
'End if
      set rs = GetMonthSessionList(lid,monthid)

      %>
<br>
<script language="JavaScript">
      function confirm_session_delete(sessionid, name){
                  if (confirm ("Do you really want to delete the session  " + name)){
                        document.location = "sessionlist.asp?op=delsess&sessionID=" + sessionid + "&monthid=<%=monthid%>";
                        //document.frmSession.submit();
                        }
                  return false;
            }
      function confirm_month_delete(){
                  if (confirm ("Do you really want to delete the sessions for " + document.frmSession.monthid.options[document.frmSession.monthid.selectedIndex].text)){
                        location = "sessionlist.asp?lid=<%=lid%>&op=delmonth&monthID=" + document.frmSession.monthid.options[document.frmSession.monthid.selectedIndex].value;
                        }
                  return false;
            }
</script>
<form name="frmSession" action="sessionlist.asp" method="get">
<input type="hidden" name="id" value="<%=id%>">
<input type="hidden" name="lid" value="<%=lid%>">
<input type="hidden" name="op" value="<%=op%>">
<table class="formTable" cellpadding="5" cellspacing="0" border="0" align="center" width='80%'>
      <tr><td class="formTitle" colspan="2">Booking in <%=locationName%></td></tr>
      <%if message <> "" then%>
      <tr><td class="message" colspan="2"><%=message%></td></tr>
      <%elseif errmessage <> "" then%>
      <tr><td class="errmessage" colspan="2"><%=errmessage%></td></tr>
      <%end if%>
      <tr><td align="left" colspan="2">Show Booking for:</td></tr>
      <tr>
      <tr><td align="left"><select name="monthid"><%GenerateMonthCombo lid, monthid%></select>&nbsp;<input type="submit" name="month" value="Show">&nbsp;
            <input type="submit" name="deletepast" value="Delete old Sessions" onclick="return confirm_month_delete();">
      </td><td align="right"><a href="session.asp?op=add&lid=<%=lid%>">Add session</a>&nbsp;in&nbsp;<select name="locationID" onChange="javascript:document.location='sessionlist.asp?lid=' + document.frmSession.locationID.value;"><%GenerateLocationCombo(lid)%></select></td></tr>
      <tr>
            <td width="100%" colspan="2">
                  <table cellspacing="0" cellpadding="5" width="100%" border="0">
                        <tr class="tableHeader">
                              <td width="20%">Date</td>
                              <td width="8%">Start</td>
                              <td width="8%">End</td>
                              <td width="24%">Session Name</td>
                              <td width="10%">Status</td>
                              <td width="5%" align="right">Registered</td>                              
                              <td width="10%" align="right">Confirmed</td>
                              <td width="15%" align="right">Available</td>
                        </tr>
                        <%
                        dim i, oddRow, firstWaitID, firstWaitName, freeSlots, firstMember, regslots, confslots
                        i = 0
                        while not rs.EOF
                              i = 1 - i
                              if i = 0 then
                                    oddrow = "class=""highlight"""
                              else
                                    oddrow = ""
                              end if
                              confslots = GetMemberNumberByStatus(rs("SessionID"),"C")
                              regslots = GetMemberNumberByStatus(rs("SessionID"),"R") + confslots
                              freeSlots = rs("slot") - confslots'Session_GetFreeSlots(rs("SessionID")) - confslots
                              %>
                        <tr <%=oddrow%>>
                              <td><%=FormatDateTime(rs("SessionDate"),vbLongDate)%></td>
                              <td><%=rs("StartHour") & ":" & rs("StartMin") & " " & rs("StartSuffix")%></td>
                              <td><%=rs("EndHour") & ":" & rs("EndMin") & " " & rs("EndSuffix")%></td>
                              <td><a href="session.asp?sid=<%=rs("SessionID")%>" title="Edit session"><%=Encode(rs("SessionName"))%></a></td>
                              <td><%=rs("StatusName")%>&nbsp;<input class="redbutton" type="button" name="action" value="Delete" onClick="confirm_session_delete(<%=rs("sessionID")%>,'<%=rs("sessionname")%>');"></td>
                              <td align="right"><%=regslots%></td>
                              <td align="right"><%=iif(rs("MembersNo")=999,"none","<a href=""membersbysession.asp?sid=" & rs("SessionID") & """>" & rs("MembersNo") & "&nbsp;(view)</a>")%>
                              <td align="right"><%=freeslots%></td>
                        </tr>
                        <%rs.MoveNext
                        wend%>
                  </table>
            </td>
      </tr>
</table>
</form>
<!-- #include file="include/footer.asp" -->
-Corey
0
Cloud Class® Course: Microsoft Exchange Server

The MCTS: Microsoft Exchange Server 2010 certification validates your skills in supporting the maintenance and administration of the Exchange servers in an enterprise environment. Learn everything you need to know with this course.

alorentzCommented:
NO, ExecuteSQL is being called somewhere in the error page.
0
coreybryantAuthor Commented:
Wel here is the page that is being called:
<!-- #include file="include/header.asp" -->
<script language="JavaScript">
      function DoSubmit(op,sid,id) {
            document.frmMembersBySession.op.value = op;
            document.frmMembersBySession.id.value = id;
            document.frmMembersBySession.sid.value = sid;
            document.frmMembersBySession.submit();
      }
      function SaveNote(msid) {
            document.frmMembersBySession.msid.value = msid;
            document.frmMembersBySession.submit();
      }
      function ConfAll(id) {
            document.frmMembersBySession.id.value = id;
            document.frmMembersBySession.call.value = 'A';
            document.frmMembersBySession.submit();
      }
</script>
<%
'show members in a session
CheckPermissionCMS(SITEOWNER)

dim op, id, sid, rs, sessionName, message, errmessage, registeredNo, confirmedNo, action, actionmsg, totalNo
dim sessiondate, sessionhour, sessionminute, sessionsuffix, msid, note
if Request.Form("fromSubmit") <> "yes" then
      sid = Request.QueryString("sid") 'session ID
      if not isNumeric(sid) or sid="" then
            rw "Invalid session ID"
            re
      end if
else
      if Request.Form("msid") <> "" then                          
               msid = request.Form("msid")
            note = request.Form("comments" & msid)
            Call SaveNote(msid, note)
            response.redirect "membersbysession.asp?sid=" & request.Form("sid")
      end if
      If Request.Form("call") = "A" then
            ' confirm all
            dim callx, callxar, i
            sid = Request.Form("sid")
            If request.Form("callx") <> ""  Then
                  callx = request.Form("callx")
                  callxar = split(callx,",")
                  For i = 0 to Ubound(callxar)
                        ConfirmSession sid, callxar(i)
                  Next
            else
                  rw "!!! Nothing to Confirm!"
            End if
      end if            
      
      id = Request.Form("id")
      op = Request.Form("op")
      sid = Request.Form("sid")
      
      if op <> "" then
            if not isNumeric(id) or id = "" then
                  rw "Invalid Member ID:" & id
                  re
            end if      
            if not isNumeric(sid) or sid="" then
                  rw "Invalid session ID"
                  re
            end if
            if op = "C" then
                  ConfirmSession sid, id
            elseif op = "R" then
                  session("who")="A"
                  RegisterSession sid, id
            elseif op = "X" then
                  CancelSession sid, id
            elseif op = "L" then
                  LateCancelSession sid, id
            elseif op = "W" then
                  WaitSession sid, id
            end if
      end if
end if

sessionName = GetSessionDetail(sid).SessionName
sessionDate = GetSessionDetail(sid).SessionDate
sessionHour = GetSessionDetail(sid).StartHour
sessionMinute = GetSessionDetail(sid).StartMin
sessionSuffix = GetSessionDetail(sid).StartSuffix
confirmedNo = GetMemberNumberByStatus(sid, "C")
registeredNo = GetMemberNumberByStatus(sid, "R")
totalNo = confirmedNo + registeredNo
set rs = GetMemberListBySession(sid)
%>
<br>
<form name="frmMembersBySession" action="membersbysession.asp" method="post">
<input type="hidden" name="id" value="">
<input type="hidden" name="op" value="">
<input type="hidden" name="sid" value="<%=sid%>">
<input type="hidden" name="msid" value="">
<input type="hidden" name="call" value="">
<input type="hidden" name="fromSubmit" value="yes">
<table class="formTable" cellpadding="5" cellspacing="0" border="0" align="center" width='80%'>
      <tr><td class="formTitle">Members in <%=sessionName%>&nbsp(<%=formatdatetime(sessiondate,1)%>&nbsp<%=sessionhour%>:<%=sessionminute%> &nbsp<%=sessionsuffix%>)&nbsp;[<%=confirmedNo%> member<%=iif(CInt(confirmedNo)<>1,"s","")%> confirmed]</td></tr>
      <%if message <> "" then%>
      <tr><td class="message"><%=message%></td></tr>
      <%elseif errmessage <> "" then%>
      <tr><td class="errmessage"><%=errmessage%></td></tr>
      <%end if%>
      <tr><td>&nbsp;</td></tr>
      <tr><td align="right"><a href="memberadd.asp?sid=<%=sid%>">add member to session</a></td></tr>
      <tr>
            <td width="100%">
                  <table cellspacing="0" cellpadding="2" width="100%" border="0">
                        <tr class="tableHeader">
                              <td width="3%"></td>
                              <td width="10%">Name</td>
                              <td width="5%">Booking</td>
                              <td width="5%">Sess. left</td>
                              <td width="10%">Update</td>
                              <td width="10%">Status</td>
                              <td width="5%">Added By</td>
                              <td width="10%">Due</td>
                              <td width="20%">Note</td>
                              <td width="5%">&nbsp;</td>
                              <td width="15%" align="center">Action</td>
                        </tr>
                        <%
                        dim oddRow
                        i = 0
                        while not rs.EOF
                              action = AvailableActionsCMS(sid, totalNo, rs("StatusCode"), rs("memberID"), actionmsg)                              
                              i = 1 - i
                              if i = 0 then
                                    oddrow = "class=""highlight"""
                              else
                                    oddrow = ""
                              end if%>
                        <tr <%=oddrow%>>
                              <td><input type="checkbox" name="callx" value="<%=rs("memberID")%>" <%If rs("StatusCode")<>"R" or actionmsg="passed session" Then%>disabled<%
                              End if%>></td>
                              <td><a href="member.asp?id=<%=rs("memberID")%>"><%=Encode(rs("FirstName") & " " & rs("LastName"))%></a></td>
                              <td><a href="sessionsbymember.asp?id=<%=rs("memberID")%>">(view)</a></td>
                              <td><%=rs("SessionsLeft")%></td>
                              <td><%=FormatDateTime(rs("RegisterDate"),vbShortDate)%></td>
                              <td>
                                    <%=iif(rs("StatusCode")="C","<b>","")%><%=Encode(rs("StatusName"))%><%=iif(rs("StatusCode")="C","</b>","")%>
                                    <%if (action = "X" or action = "L") and rs("StatusCode") <> "C" then%>
                                          &nbsp;&nbsp;&nbsp;<input class="redbutton" type="button" name="action" value="Confirm" onClick="javascript:DoSubmit('C',<%=sid%>,<%=rs("memberID")%>);">
                                    <%end if%>
                              </td>
                              <td><%=rs("registeredby")%></td>
                              <td><%If rs("SessionsLeft")<=0 Then
                                    GetLastConfirmed rs("memberID")
                              else%>
                                    Unknown
                              <%End if%>
                              </td>
                              <td><textarea rows="2" cols="15" name="comments<%=rs("membersessionID")%>"><%=rs("Comments")%></textarea></td>
                              <td><input type="image" src="images/save.gif" value="savenote" alt="save comment" onClick="javascript:SaveNote(<%=rs("membersessionID")%>);">
                              </td>
                              <td>
                                    <%if actionmsg = "" then
                                          ActionLinkCMS action, sid, rs("memberID") ' id
                                    else
                                          rw actionmsg
                                          If actionmsg = "confirmed" Then
                                                rw vbCRLF
                                                ActionLinkCMS action, sid, rs("memberID") ' id                              
                                          End if
                                    end if%>
                              </td>                              
                        </tr>
                        <%rs.MoveNext
                        wend%>
                        <tr><td colspan=9>&nbsp;</td></tr>
                        <tr><td colspan=9><input type="button" class="button" value="Confirm all selected" onClick="javascript:ConfAll(<%=sid%>);"></td></tr>
                  </table>
            </td>
      </tr>
</table>
</form>
<!-- #include file="include/footer.asp" -->

(file name: membersbysession.asp?sid=524) - does that hopefully help?
0
alorentzCommented:
Well, this line rs.Open comm, is nowhere in that page, so you are giving the wrong information!
0
coreybryantAuthor Commented:
Well after looking more at the includes - I see the query.asp is actually included - but I am not certain what I am looking for..   Is ExecuteSQL exactly what I am looking for?

-Corey
0
sciber_dudeCommented:
you are looking for either a function or a sub with the name ExecuteSQL I guess. You need to find it on one of the page (probably one of the include pages) coz you didnt find it on the code you posted here.

:) SD
0
Wayne BarronAuthor, Web DeveloperCommented:
Sounds like you do not have an Entry in the Database for what you are trying to call.
i.e.
Search for "something"
And "something" is in the Table.Field = Things

"Something" is not actually in that Table.Field.

Do you follow me?

Check to make sure that the Data exist in the Table.Field before running the script.

I get this error All The Time. In the site that I am designing.

Info:

Database = Your have "Tables" in the Database.
Inside the Tables = Are "Fields"
You need to look through the Fields to make sure that everything that
You are wanting to retrieve, exist in the proper Fields.

Carrzkiss
0
coreybryantAuthor Commented:
The programmer finally got back about midnight & fixed this problem.  SD you were on the right track @ least & kept pointing me to the right stuff.

Thanks!

-Corey
0
sciber_dudeCommented:
@ coreybryant -

> SD you were on the right track
No! I just paraphrased what alorentz was saying! I think he deserves the credit!

:) SD
0
coreybryantAuthor Commented:
Sorry I only thought one person was talking - there was a lot of information here
-Corey
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
ASP

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.