Vraag & Antwoord

OS Windows

Runtime error '-2147467259(80004005)'

1 antwoord
  • Op een oudere computer, [b:803793fd81]Pentium mmx 160mhz, mobo Soltek Sl-52E2[/b:803793fd81] heb ik opnieuw de harde schijf geformateerd en daarna Windows 98SE opnieuw geinstalleerd. Daarna via Windows Update alles bijgewerkt. Op deze computer heb ik het spelletje [b:803793fd81]Monopoly[/b:803793fd81] geinstalleerd te vinden op senioren web (Dit is een eenvoudig bordspelletje). Open van het spelletje gaat goed. Maar al ik wil gaan spelen krijg ik de volgende foutmelding: [b:803793fd81]Runtime error '-2147467259(80004005)'[/b:803793fd81] Nu heb ik op de Microsoft webside de foutmelding gevonden, zie hieronder. Maar ik snap er geen hout van. Kan iemand mij vertellen wat precies het probleem is en nog belangrijker hoe het op te lossen is????? Hans [b:803793fd81]Microsoft Knowledge Base Article - 180843 [/b:803793fd81]http://support.microsoft.com/default.aspx?scid=http://support.microsoft.com:80/support/kb/articles/q180/8/43.asp&NoWebContent=1#appliesto Commentaar? Als u kort commentaar wilt geven op dit artikel, kunt u uw opmerking in de ruimte hieronder typen (tot 255 teken). Algemene Informatie Contact Microsoft Ondersteunings mogelijkheden, Telefoonnummers en Online Ondersteuning Klanten Service Klanten Service, Aankoop informatie Microsoft Producten en Productinformatie Ondersteuning Webcasts Online Presentaties over Microsoft Producten, zowel live als opgenomen door Microsoft Specialisten Paginaopties Printen Versturen PRB: Error Creating More Than One Recordset in a Transaction Van toepassing op This article was previously published under Q180843 SYMPTOMS When you try to create more than one recordset in the middle of a transaction, the following error occurs: Cannot create a new connection because in manual transaction mode The HRESULT is 0x80004005. Alternatively, you may receive the following, more informative error message: Runtime error '-2147467259(80004005)': You can't have multiple recordsets with this cursortype (in a transaction.) Either change the cursor type, commit the transaction, or close one of the recordsets. or this similar error message: Runtime error '-2147467259(80004005)': Transaction cannot have multiple recordsets with this cursor type (in a transaction.) Change the cursor type, commit the transaction, or close one of the recordsets. CAUSE SQL Server can only open one ForwardOnly cursor at a time on a connection, because SQL Server can only process one active statement at a time per connection. When you try to open more than one ForwardOnly ADO recordset at a time on a single Connection, only the first ADO recordset is actually opened on the Connection object. New, separate connections are created for subsequent ForwardOnly cursors. A transaction is on a single connection. When you attempt to open more than one ForwardOnly recordset within a single transaction, ADO attempts to open more than one ForwardOnly recordset on the connection of the transaction. An error occurs because SQL Server only allows one ForwardOnly recordset on a single connection. Because the error is within a manual transaction, you might see the error above. Microsoft Data Access Objects 2.1 Service Pack 2 and later versions of MDAC contain more informative error messages. For that reason, you may see the more informative second or third error message, above. RESOLUTION Use a different cursor type, change the cursor location to adUseClient or close the first recordset before opening another on the same connection/transaction. For example, if you use the following code the error will not occur: Note You must change Username=<username> and PWD=<strong password> to the correct values before you run this code. Make sure that User ID, UID, and Username have the appropriate permissions to perform this operation on the database.Dim cnn1 As New ADODB.Connection Dim rs1 As New ADODB.Recordset Dim rs2 As New ADODB.Recordset strCnn = "DSN=Springhill;Username=<username>;PWD=<strong password>;database=pubs" cnn1.Open strCnn cnn1.BeginTrans rs1.Open "Select * from authors", cnn1, adOpenStatic, adLockOptimistic rs2.Open "Select * from publishers", cnn1, adOpenStatic, adLockOptimistic cnn1.CommitTrans cnn1.Close NOTE: If you refer to either recordset after the transaction has been committed or aborted, you see the following error: Run-time error '-2147418113': Catastrophic failure You must either use and then close the recordsets within the transaction or preserve the cursors. The OLE DB Provider for ODBC does not allow preserving cursors, so you must close the recordsets within the transaction. The OLE DB Provider for SQL Server does allow preserving cursors. See the REFERENCES section of this article for more information. STATUS This behavior is by design. MORE INFORMATION Steps to Reproduce Behavior The following Visual Basic code causes the error to occur: Note You must change Username=<username> and PWD=<strong password> to the correct values before you run this code. Make sure that User ID, UID, and Username have the appropriate permissions to perform this operation on the database.Dim cnn1 As ADODB.Connection Dim rs1 As Recordset Dim rs2 As Recordset Dim strCnn As String Set cnn1 = New ADODB.Connection strCnn = "DSN=SQLServer;Username=<username>;PWD=<strong password>;database=pubs" cnn1.Open strCnn cnn1.BeginTrans Set rs1 = cnn1.Execute("Select * from authors") Set rs2 = cnn1.Execute("Select * from publishers") cnn1.CommitTrans cnn1.Close End Sub REFERENCES For additional information about the 'Catastrophic failure' message in this context, click the following article number to view the article in the Microsoft Knowledge Base: 187942 PRB: Catastrophic Error Occurs Referencing ADO Recordset For additional information about ForwardOnly recordsets and ADO, click the following article number to view the article in the Microsoft Knowledge Base: 235282 INFO: SQL Server Spawns Additional Connections When You Open Multiple ForwardOnly ADO Recordsets The information in this article applies to: ActiveX Data Objects (ADO) 1.5 ActiveX Data Objects (ADO) 2.0 ActiveX Data Objects (ADO) 2.1 SP2 ActiveX Data Objects (ADO) 2.5 ActiveX Data Objects (ADO) 2.6 ActiveX Data Objects (ADO) 2.7 Last Reviewed: 11/6/2003 (2.0) Keywords: kbDatabase kbprb KB180843

Beantwoord deze vraag

Weet jij het antwoord op deze vraag? Registreer of meld je aan met je account

Dit is een gearchiveerde pagina. Antwoorden is niet meer mogelijk.