Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations MikeeOK on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Could not allocate a new object descriptor? 1

Status
Not open for further replies.

Ruairi

Programmer
May 14, 2000
314
US
I am adding records to a table in SQL server 6.5 from a visual basic app. I just started getting a run time error returned when trying to add a row. The error description is:
"[Microsoft][ODBC SQL Server Driver][SQL Server]Could not allocate a new object descriptor for required system catalog in database '6'. Another database must be closed or objects in another database dropped in order to open this database."
Does anyone know what this means? database '6' doesnt mean anything to me. Some kind of a temp DB? The visual basic code where the error is arising from is shown below. I typically have about 50 - 100 of these inserts inside a transaction, because the user needs to be able to roll back the whole thing depending on errors or warnings. This was working fine. Any help greatly appricated. TIA.

speciesrec = Val(subs.GetCode(sortsrec, cbospeciessort))
If speciesrec = allspeciesrec Then
speciesrec = defaultspeciesrec
End If
sql = "select * from loads where rec = " & loadsrec
OpenSubs.OpenRecordset rs, sql
If rs.BOF And rs.EOF Then
rs.AddNew
End If
rs("statusrec") = statusrec
rs("dag") = dag
rs("paiddag") = OpenSubs.NoDate
rs("paidflag") = subs.CheckToChar(vbUnchecked)
rs("brandname") = BrandName
rs("brandsrec") = brandsrec
rs("sortsrec") = sortsrec
rs("invoiceddag") = OpenSubs.NoDate
rs("invoicedflag") = subs.CheckToChar(vbUnchecked)
rs("destinationrec") = destinationrec
rs("vbdpricerec") = vbdpricerec
rs("deck") = ""
rs("vendorrec") = vendorrec
rs("vc") = 0
rs("vpfr") = 0
rs("sc") = 0
rs("spfr") = 0
rs("fallerrec") = nonefallerrec
rs("fc") = 0
rs("fpfr") = 0
rs("truckerrec") = nonetruckerrec
rs("tc") = 0
rs("tpfr") = 0
rs("hc") = 0
rs("cc") = 0
rs("cpfr") = 0
If blankyardticket Then
yardticket = ComSubs.GetDefaultYardticket()
End If
rs("yardticket") = yardticket
rs("scaleticket") = scaleticket
rs("weightticket") = weightticket
rs("supplierticket") = supplierticket
rs("certificate") = certificate
rs("othergl") = ""
rs("gross") = 0
rs("pieces") = 0
rs("voucher") = 0
rs("net") = 0
rs("penalty") = 0
rs("invoice") = 0
rs("utility") = 0
rs("averagelength") = 0
rs("mtflag") = subs.CheckToChar(mtflag)
rs("weight") = weight
rs("averagediameter") = 0
If weight > 0 Then
rs("weighedflag") = subs.CheckToChar(vbChecked)
Else
rs("weighedflag") = subs.CheckToChar(vbUnchecked)
End If
rs("customerrec") = nonevendorrec
rs("enet") = 0
rs("eutility") = 0
rs("pgross") = 0
rs("subst") = 0
rs("scu") = 0
rs("scun") = 0
rs("xp") = 0
rs("mism") = 0
rs("cu") = 0
rs("hbamount") = 0
rs("adamount") = 0
rs("udamount") = 0
rs("hbdag") = OpenSubs.NoDate
rs("uddag") = OpenSubs.NoDate
rs("transferflag") = ""
rs("sequence") = 0
rs("bureaurec") = bureaurec
rs("glcode") = glcode ' "" added 2/9/2001
rs("speciesrec") = speciesrec
rs("cutdag") = OpenSubs.NoDate
rs("processdag") = subs.FormatDate(subs.FormatShortDateText(Now))
rs("samplescaledflag") = subs.CheckToChar(vbUnchecked)
rs("scaletyperec") = enuScaleFlag.BureauScaled
rs("loggerrec") = loggerrec 'added 10/23/00 logger rec added to load file
rs("cdatabaserec") = OpenSubs.Cdatabaserec
rs("ddatabaserec") = OpenSubs.Ddatabaserec
'On Error GoTo cancel_AddLoad '**** removed for debugging, put it back
rs.Update 'error occurs here
Ruairi

Could your manufacturing facility benefit from real time process monitoring? Would you like your employees to be able to see up to the minute goal and actual production?
For innovative, low cost solutions check out my website.
 
Execute sp_configure and look at Open Objects and Open Datasbases settings. You can increase the number of open objects and open databases and see if that eliminates the problem. Don't increase them too much because open objects use memory.

I believe you'll need to restart SQL Server after changing the options.

You can use Performance Monitor to check the current number of Open Objects and Open Databases. Terry
 
Terry,
That was the problem. Open Objects was set to 500. I changed the setting to 1500 and that took care of the problem. Thank you for your fast response. Ruairi

Could your manufacturing facility benefit from real time process monitoring? Would you like your employees to be able to see up to the minute goal and actual production?
For innovative, low cost solutions check out my website.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top