Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Did I reach a limit on concurrent recordset connections?

Posted on 2004-09-23
5
Medium Priority
?
223 Views
Last Modified: 2006-11-17
I keeping getting the following error when I add another connection in this asp app.

Microsoft OLE DB Provider for SQL Server error '80040e21'

Multiple-step OLE DB operation generated errors. Check each OLE DB status value, if available. No work was done.

/CMANAGER/editNOTES/editNOTES.ASP, line 124

It was functioning correctly with no errors until I added another recordset connection

Here is the syntax and I for the life of me cannot figure out what is wrong. The table that is not allowing adding records is a new table but I know the field definitions are correct. The new table name is Notes.

below is the form action when data is submitted
The cs variable holds the new table connection

Other connection variables not listed below are inside the form for populating lists. SO did I reach a limited and if not what is wrong. I can't even get one record inside the new table

<%
Response.Buffer = True
Dim connStrx, rs, ss, ts, zs, ds, email1, email2, chap1, bookopt, TX

connStrx = "Provider=SQLOLEDB;UID=;PWD=;Data Source=;Initial Catalog=;"

Set ss = CreateObject("ADODB.Recordset")
Set rs = CreateObject("ADODB.Recordset")
Set ts = CreateObject("ADODB.Recordset")
Set zs = CreateObject("ADODB.Recordset")
Set ds = CreateObject("ADODB.Recordset")
Set cs = CreateObject("ADODB.Recordset")

If Request.Form("Submit")="Update" Then
 if request.form("contact") <> "Information Only" then
   ss.Open "companies where cust_id=" & request.form("cust_id1"), connStrx, 2, 2
   ss("summary_contact") = "<A NAME='" & request.form("nextdate") & "'></A><br>" & _
   "Record Appended: " & date() & "<br>" & _
   "Person Contacted: " & request.form("contact") & "<br>" & _
   "Modified by: " & request.form("sessiona") & "<br>" & _
   "Type of Contact: " & request.form("method") & "<br>" & _
   "Next Contact Method: " & request.form("method2") & "<br>" & _
   "Next Contact Scheduled for: " & request.form("nextdate") & "<br>" & _
   "Additional Notes: <br>" & _
   request.form("newtext") & "<br><br>" & _
   "*********************<br>*********************<br><br>" & _
   ss("summary_contact")
   ss("next_contact") = request.form("NextDate")
   ss("next_contact_type") = request.form("Method2")
   ss("last_contact") = date()
   ss("type_contact") = request.form("method")
   ss.Update
 else
 end if

 if request.form("contact") = "Information Only" then
   ss.Open "companies where cust_id=" & request.form("cust_id1"), connStrx, 2, 2
   ss("summary_contact") = "<br>INFORMATION ONLY UPDATE<br>" & _
   "Record Appended: " & date() & "<br>" & _
   "Modified by: " & request.form("sessiona") & "<br>" & _
   "INFORMATIONAL NOTES: <br>" & _
   request.form("newtext") & "<br><br>" & _
   "*********************<br>*********************<br><br>" & _
   ss("summary_contact")
   ss.Update
 else
 end if

   ts.open "Log", connStrx, 2, 2
   ts.AddNew
   ts("date") = date()
   ts("time") = time()
   ts("username") = request.form("sessiona")
   if request.form("contact") = "Information Only" then
   ts("type") = "INFORMATIONAL NOTE UPDATE"
   ts("details") = "System User: " & request.form("sessiona") & "<br>Date: " & date() & "<br>Time: " & time() & "<br> COMPANY :" & request.form("company") & " Informational Note Added<br>"
   else
   ts("type") = "EDIT COMPANY NOTES"
   ts("details") = "System User: " & request.form("sessiona") & "<br>Date: " & date() & "<br>Time: " & time() & "<br> COMPANY :" & request.form("company") & " Notes Modified <br>"
   end if
   ts.Update
   ts.close

   cs.open "Notes", connStrx, 2, 2
   cs.AddNew
   cs("cust_id") = request.form("cust_id1")
   cs("company") = request.form("company")
   cs("contact") = request.form("contact")
   cs("date") = date()
   cs("time") = time()
   cs("type") = request.form("method")
   cs("username") = request.form("sessiona")
   cs("details") = "<br>" & _
   "Record Created: " & date() & "<br>" & _
   "Person Contacted: " & request.form("contact") & "<br>" & _
   "Modified by: " & request.form("sessiona") & "<br>" & _
   "Type of Contact: " & request.form("method") & "<br>" & _
   "Next Contact Method: " & request.form("method2") & "<br>" & _
   "Next Contact Scheduled for: " & request.form("nextdate") & "<br>" & _
   "Additional Notes: <br>" & _
   request.form("newtext") & "<br><br>" & _
   "*********************<br>*********************<br><br>" & _
   cs.Update
   cs.close
   
   response.write "Notes have been updated<br>Email sent to : " & request.form("email1") & "<br><a href='javascript:window.close()'>Close this Window</a>"
   email1= request.form("email1")
   if len(rtrim(email1))>1 then
    ds.open"users where rtrim(name)='" & request.form("sessiona") & "'", connstrx, 3, 4
    Dim objMail
    Set objMail = Server.CreateObject("CDONTS.NewMail")
    objMail.From = ds("email")
    objMail.Subject = "Company Notes and Schedule has been modified"
    objMail.To = request.form("email1")
    objMail.CC = ds("email")
    objMail.BodyFormat=0
    objMail.MailFormat=0
    if request.form("contact") = "Information Only" then
    objMail.Body = "<p>" & _
    "<P>" &_
    " The following INFORMATIONAL Notes have been added and sent to you by: " & ds("name") & "<br>" & _
    "Please login to the <a href='http://www.simeusfoods.net/cmanager/cmanager.asp' title='Click here to Login'>Simeus Foods Contact Manager Website</a> for further details<br><br>" & _
    "Record Appended: " & date() & "<br>" & _
    "Company Name: " & request.form("company") & "<br>" & _
    "INFORMATIONAL NOTE: <br>" & _
    request.form("newtext") & "<br><br>" & _
    "*********************<br>*********************<br><br>"
    else
    objMail.Body = "<p>" & _
    "<P>" &_
    " The following Notes have been added and sent to you by: " & ds("name") & "<br>" & _
    "Please login to the <a href='http://www.simeusfoods.net/cmanager/cmanager.asp' title='Click here to Login'>Simeus Foods Contact Manager Website</a> for further details<br><br>" & _
    "Record Appended: " & date() & "<br>" & _
    "Company Name: " & request.form("company") & "<br>" & _
    "Contact Name: " & request.form("contact") & "<br>" & _
    "Person Contacted: " & request.form("contact") & "<br>" & _
    "Modified by: " & request.form("sessiona") & "<br>" & _
    "Type of Contact: " & request.form("method") & "<br>" & _
    "Next Contact Method: " & request.form("method2") & "<br>" & _
    "Next Contact Scheduled for: " & request.form("nextdate") & "<br>" & _
    "Additional Notes: <br>" & _
    request.form("newtext") & "<br><br>" & _
    "*********************<br>*********************<br><br>"
    end if
    objMail.Send
    Set objMail = nothing
   else
   end if
   
else
%>
0
Comment
Question by:mikekujawa
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
5 Comments
 
LVL 7

Expert Comment

by:kmorris1186
ID: 12137498
This should affect it, but try destroying the record set when done with it...

Afte the "rs.close" add a "Set rs = Nothing"
0
 

Author Comment

by:mikekujawa
ID: 12137801
Tried that and terminated the connections as each routine was finished with same results. :-(
0
 

Author Comment

by:mikekujawa
ID: 12138357
I found the problem.
Seems I called out the memo field wrong
had to be ntext 16 instead of text 16

Thank you for your help anyways
0
 

Accepted Solution

by:
ee_ai_construct earned 0 total points
ID: 12169526
Closed, 125 points refunded.
ee_ai_construct (replacement part #xm34)
Community Support Admin
0

Featured Post

Tech or Treat!

Submit an article about your scariest tech experience—and the solution—and you’ll be automatically entered to win one of 4 fantastic tech gadgets.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I recently decide that I needed a way to make my pages scream on the net.   While searching around how I can accomplish this I stumbled across a great article that stated "minimize the server requests." I got to thinking, hey, I use more than one…
This demonstration started out as a follow up to some recently posted questions on the subject of logging in: http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/Q_28634665.html and http://www.experts-exchange.com/Programming/…
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…

609 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question