473,836 Members | 1,626 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

ADO Error 3251: Current provider does not support returning multiple recordsets from a single execution?

I posted this in the MS Access group, but no luck.
------------------------------------------
I've got another stored procedure in the same app that returns multiple
recordsets and the code works.

But now I've written another SP and the code traps out with the 3251 message.

The SP is writing two recordsets.

When I run the SP in Query Analyzer, both recordsets appear.

But when I step through the code, when the first RS should be there, it's
"Closed" and nothing I've tried will make it open.
Provider=SQLOLE DB.1 (which works on the other screen...)

Seems like I've been here before, but I can't remember what the problem was.
--
PeteCresswell
Jul 20 '05 #1
7 16554
(Pete Cresswell) (x@y.z) writes:
I posted this in the MS Access group, but no luck.
------------------------------------------
I've got another stored procedure in the same app that returns multiple
recordsets and the code works.

But now I've written another SP and the code traps out with the 3251
message.

The SP is writing two recordsets.

When I run the SP in Query Analyzer, both recordsets appear.

But when I step through the code, when the first RS should be there, it's
"Closed" and nothing I've tried will make it open.


That is likely to be a rowcount from an INSERT into a temp table or
something like that. Step to next with .NextRecordset. Or use SET
NOCOUNT ON.

I don't think you can have multiple record sets with all settings.
But if you stick to client-side cursors, this should not be a problem.
--
Erland Sommarskog, SQL Server MVP, so****@algonet. se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techinf...2000/books.asp
Jul 20 '05 #2
RE/
That is likely to be a rowcount from an INSERT into a temp table or
something like that. Step to next with .NextRecordset. Or use SET
NOCOUNT ON.


That was my first suspicion too...but it *looks* like I've got my NOCOUNT
settings in the right place.

If not, shouldn't the extraneous recordsets show up when I execute the procedure
under Query Analyzer?
--
PeteCresswell
Jul 20 '05 #3
RE/
NOCOUNT


Then I jumped to the conclusion that maybe there was some kind of runtime error
in the query that I wasn't trapping....but I kept coming back to the fact that
everything looks a-ok when the query runs in Query Analyzer....and the
..CursorType is defaulted - the same as it is in a similar multi-recordset query
that works.
--
PeteCresswell
Jul 20 '05 #4
RE/
same as it is in a similar multi-recordset query
that works.


One thing I notice in Query Analyzer is that when I toggle "Display Estimated
Execution Plan" on and off, the following error is thrown:
-------------------
Server: Msg 208, Level 16, State 1, Procedure spEstimate_Load , Line 139
Invalid object name '#Extract1'.
-------------------

But, as noted before, we see apparently-good output when the SP executes.

Also, the same error pops when the other procedure (the similar one that
works...) is up in Query Analyzer and "Display Estimated Execution Plan" is
toggled.
--
PeteCresswell
Jul 20 '05 #5
RE/
no luck.


Bingo!

I was summing the contents of a #Temp table to coalesce some of the columns.

When I defined the table, I failed to specify DEFAULT 0 for the numeric fields.

Somehow, the Sum() statements worked when running under Query Analyzer, but
created 2 Closed/empty recordsets running from VBA/ADO.
--
PeteCresswell
Jul 20 '05 #6
(Pete Cresswell) (x@y.z) writes:
One thing I notice in Query Analyzer is that when I toggle "Display
Estimated Execution Plan" on and off, the following error is thrown:
-------------------
Server: Msg 208, Level 16, State 1, Procedure spEstimate_Load , Line 139
Invalid object name '#Extract1'.
-------------------


I would guess this is due to that when you use "Estimatade plan", QA runs
the query with SET FMTONLY ON. With this setting, SQL Server traverses
the batch, without executing the statements with one exception: it
enters stored procedures. You get this error, because it does not create
the temp table which appears further down in the procedure.

Now, there are situations where ADO can start to run queries with SET
FMTONLY ON. I've seen this happen if you call your stored procedure
with ODBC syntax and a .CommandType of adCmdText. Use adCmdStoredProc edure
instead.

--
Erland Sommarskog, SQL Server MVP, so****@algonet. se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techinf...2000/books.asp
Jul 20 '05 #7
(Pete Cresswell) (x@y.z) writes:
I was summing the contents of a #Temp table to coalesce some of the
columns.

When I defined the table, I failed to specify DEFAULT 0 for the numeric
fields.

Somehow, the Sum() statements worked when running under Query Analyzer,
but created 2 Closed/empty recordsets running from VBA/ADO.


Hm, could that be because of the ANSI warnings for eliminating the
NULL values? Run the query from QA in text mode, and be sure to have
ANSI_WARNINGS ON, and you will see what I mean. (You will have to remove
the default of course.)
--
Erland Sommarskog, SQL Server MVP, so****@algonet. se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techinf...2000/books.asp
Jul 20 '05 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
3471
by: (Pete Cresswell) | last post by:
I've got another stored procedure in the same app that returns multiple recordsets and the code works. But now I've written another SP and the code traps out with the 3251 message. The SP is writing two recordsets, but when I step through the code, when the first RS should be there, it's "Closed" and nothing I've tried will make it open. Seems like I've been here before, but I can't remember what the problem was.
6
4768
by: Peter Frost | last post by:
Please help I don't know if this is possible but what I would really like to do is to use On Error Goto to capture the code that is being executed when an error occurs. Any help would be much appreciated. Thanks in advance
15
5374
by: David Lozzi | last post by:
Howdy, I have a function that uploads an image and that works great. I love ..Nets built in upload, so much easier than 3rd party uploaders! Now I am making a public function that will take the path of the uploaded image, and resize it with the provided dimensions. My function is below. The current function is returning an error when run from the upload function: A generic error occurred in GDI+. Not sure what exactly that means. From what...
6
4961
by: Chris Love | last post by:
An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified) I get this the frist time I open an ASP.NEt 2.0 site on my development machine now. It started happening when I tried to use the...
1
9451
by: ydprasad | last post by:
I am trying to convert the code that was written in VB using DAO to ADO. But when i tried to do following getting an error '3251'. *************code************************** Dim cn As New ADODB.Connection cn.Open "Driver={Microsoft Access Driver (*.mdb)};Dbq=c:\Website Projects\ExitCashFlow\logMaster\Logs.mdb;" dim recdcath as adodb.recordset
6
9666
by: akoymakoy | last post by:
Run time error 3251 Current Recordset does not support updating, this may be a limitation of the provider, or of the selected Locktype This is my simple program that will split the entries that have 2 words in it and put it in separate fields: im using MSaccess for my tables for example: before field1= word1, word2
3
616
by: amatuer | last post by:
ADODB.Recordset error '800a0cb3' Current Recordset does not support updating. This may be a limitation of the provider, or of the selected locktype. /devag/newProjSave.asp, line 321 sqlOCF = "SELECT * FROM DA_OtherCFacilities" set rstOCF = CreateObject("ADODB.Recordset")
3
13366
by: Ted | last post by:
In WSAT, I get the following error when trying to set up my provider: Could not establish a connection to the database. If you have not yet created the SQL Server database, exit the Web Site Administration tool, use the aspnet_regsql command-line utility to create and configure the database, and then return to this tool to set the provider. On Windows XP Pro, I am using MS Visual Studio 2005, and I am using the developer's edition of...
2
4215
by: slinky | last post by:
I'm getting a error when I open my . aspx in my browser... line 34: da.Fill(ds, "Assets") Here's the error and my entire code for this .aspx.vb is below that ... I need some clues as to what is causing the error... Thanks!!! Server Error in '/' Application. ---------------------------------------------------------------------------­----- Multiple-step OLE DB operation generated errors. Check each OLE DB
0
9825
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9673
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10859
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10560
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9388
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7795
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6984
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5653
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4463
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.