Current provider does not support returning multiple..

ADO

    Next

  • 1. ADO Requery method
    When I use the IADO recordbinding interface to get and set field values, do I need to recall QueryInterface() and/or BindToRecordset() after calling the Requery method on the record set? If I display the records, call Requery(), and then display the records again, it looks like all the record fields contain the last value from the last record in the first display records loop. Any help would be appreciated. Tom
  • 2. Need index of newly-added datarow
    Hello all, I am using the currency manager in VB to navigate a dataset. I know how to use .position to loop through the rows, but what I want to do is *get* the position of a row I just added, so that I can reposition the currency manager there sometime later. Seems like after I add a detached datarow to the datatable, that index should be sitting there somewhere for me to grab, but I don't see where that is in either the currency manager, the dataset itself, etc. I can always redo the i/o to re-retrieve the datarow, but that seems like a waste. Any ideas? TIA, BB
  • 3. runtime error -2147467259 Unrecognize database format <file name>
    hi, my software run in multiuser environment. i got runtime error -2147467259 . i check all code, but there was not any fault in that code
  • 4. SQLStatistics call from ADO
    Does anyone know how to make the SQLStatistics ODBC call from ADO??
  • 5. MSFlexGrid w/ADODB.rs doesn't work
    My computer : Win2K_SP2/ADO2.6/VB6_SP5 At runtime, I try to bind a MSFlexGrid to a recordset. It always generates a runtime error (91)! Keep in mind that flex and recordset work fine, I can populate the flex "manually" from the rs (which I do at present), but I would like to do it "automatically", the way I can with a MSDataGrid ("MSDataGrid.DataSource=rs"). VB Help says flexgrids CAN be linked to ADO recordsets. Can anyone help ? Thanks in advance ! Mike

Current provider does not support returning multiple..

Postby anonymous » Fri, 28 Nov 2003 22:48:46 GMT

I've gone form using ADO2.5 to ADO 2.7 and from MSDASQL 
to SQLOLEDB provider. Now I get errors when recordsets 
have multiple-recordsets (I can't go .nextRecordset)

Cursor is server-side.

does sqloledb not support multiple recordsets or is there 
some propety on the connection i need to change.

get this error:
Multiple-step OLE DB operation generated errors. Check 
each OLE DB status value, if available. No work was done.

help!!


Re: Current provider does not support returning multiple..

Postby Jerry III » Sat, 29 Nov 2003 07:45:53 GMT

That error means that the query you're trying to execute generates errors
when executed. It has nothing to do with multiple recordsets, how did you
come to that conclusion?

Oh and it would be nice to post your query and code if you expect anybody to
help you (except psychics who already know what you're trying to do).

Jerry








Re: Current provider does not support returning multiple..

Postby anonymous » Sat, 29 Nov 2003 16:06:36 GMT

generates errors
recordsets, how did you
you expect anybody to
trying to do).



there
done.

Re: Current provider does not support returning multiple..

Postby anonymous » Sat, 29 Nov 2003 16:13:48 GMT

Hi Jerry

I cam to that comclusion because this code used to work, 
then I changes the connection provider and version of ado 
used now it doesn't work on the recordset.movenext line. 
Also it is not failing on the insert because that works.

The vb code is :

Public Function Insert(ByVal intComID As Integer, _
                       ByVal strDescription As String, _
                       ByVal lngParentLocationID As Long, 
_
                       ByVal intLocationLevel As Integer, 
_
                       ByVal strCreatedBy As String) As 
Long

    On Error GoTo ErrorHandler
  
    Dim rstADO        As ADODB.Recordset
    Dim strSQL        As String
    
    strDescription = dbSet.FixQuote(strDescription)
    
    dbSet.BeginTrans
    
    strSQL = "SET NOCOUNT ON; INSERT INTO tStoreLocation"
    strSQL = strSQL & "("
    strSQL = strSQL & "ComID, Description, 
ParentLocationID, LocationLevel, CreatedOn, CreatedBy"
    strSQL = strSQL & ") VALUES ("
    strSQL = strSQL & intComID
    strSQL = strSQL & ", '" & strDescription & "'"
    strSQL = strSQL & ", " & lngParentLocationID
    strSQL = strSQL & ", " & intLocationLevel
    strSQL = strSQL & ", " & GetLogicalGetDate
    strSQL = strSQL & ", '" & strCreatedBy & "'"
    strSQL = strSQL & ")"
    strSQL = strSQL & "; SELECT @@IDENTITY"
    
    Set rstADO = dbSet.OpenView(strSQL)
    Insert = rstADO.NextRecordset.Fields(0)
    Set rstADO = Nothing
    
    dbSet.Commit
    
    Exit Function
    
ErrorHandler:
    App.LogEvent ErrorControl.LogMessage
("StoreLocation", "Insert")
    Set rstADO = Nothing
    dbSet.Rollback
    Err.Raise Err.Number, Err.Source, Err.Description

End Function

the Connection string is:
Provider=SQLOLEDB.1;Extended 
Properties="SERVER=phuhlisa;Database=dev;UID=sa;PWD=";Use 
Procedure for Prepare=1;Auto Translate=True;Packet 
Size=4096;Workstation ID=SAGIE;Use Encryption for 
Data=False;Tag with column collation when possible=False

And as i said th cursorlocation is server. 

And when you look at the error raised to vb you get :
Current provider does not support returning multiple 
recordsets from a single execution.

So there you go.
S

generates errors
recordsets, how did you
you expect anybody to
trying to do).



there
done.

Re: Current provider does not support returning multiple..

Postby Jerry III » Sat, 29 Nov 2003 17:29:21 GMT

y executing SET NOCOUNT ON you're explicitly saying you don't want that
empty recordset from the INSERT statement. There's your problem. You will
only get a single recordset. If it was returning two recordsets before you
found a bug in the old server/provider (I find it very hard to believe that
it was returning two recordsets before, if you only updated the provider but
made no other changes).

Also, if this executes on Microsoft's SQL server you should also be using
SCOPE_IDENTITY() instead of @@IDENTITY, so your code doesn't break if you
start using triggers.

And of course if somebody enters " ' GO DROP TABLE tStoreLocation GO --"
into your description field you might be quite surprised :)

Oh and using sa login for your application, with a blank password - well, I
really don't know what to say...

Jerry

< XXXX@XXXXX.COM > wrote in message
news:06bd01c3b57f$2b3eb5f0$ XXXX@XXXXX.COM ...




Return to ADO

 

Who is online

Users browsing this forum: No registered users and 37 guest