?
Solved

Did I reach a limit on concurrent recordset connections?

Posted on 2004-09-23
5
Medium Priority
?
220 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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

I have helped a lot of people on EE with their coding sources and have enjoyed near about every minute of it. Sometimes it can get a little tedious but it is always a challenge and the one thing that I always say is:   The Exchange of informatio…
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/…
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …
Suggested Courses

762 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