Solved

Did I reach a limit on concurrent recordset connections?

Posted on 2004-09-23
5
216 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
  • 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Hello, all! I just recently started using Microsoft's IIS 7.5 within Windows 7, as I just downloaded and installed the 90 day trial of Windows 7. (Got to love Microsoft for allowing 90 days) The main reason for downloading and testing Windows 7 is t…
I was asked about the differences between classic ASP and ASP.NET, so let me put them down here, for reference: Let's make the introductions... Classic ASP was launched by Microsoft in 1998 and dynamically generate web pages upon user interact…
This tutorial gives a high-level tour of the interface of Marketo (a marketing automation tool to help businesses track and engage prospective customers and drive them to purchase). You will see the main areas including Marketing Activities, Design …
Both in life and business – not all partnerships are created equal. As the demand for cloud services increases, so do the number of self-proclaimed cloud partners. Asking the right questions up front in the partnership, will enable both parties …

920 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now