Title: How can we do Multiple Operations using Single RecordSet?
Tags: vb.net;adodb
Question: I have some task regarding do operations on database using ADODB in Vb.NET. Can any help me regarding using the same record set multiple times?

I have tried on this topic just by closing the recordset after performing First operation and doing second operation e.t.c.
Example:

``` Dim rs As New ADODB.Recordset()
  OpenConnection()
  rs.Open("table1")
  //Some Operations 
  //Now using same recordSet for Second Operation
  rs.Close()
  rs.Open("table2")
```

In ADO.NET we have "MultipleActiveResultSets=True" in ConnectionString for SqlDataReader.Do we have any property like this in ADODB?


Here is the accepted answer: The more similar thing that exists in ADODB is sending multiple queries in your Sql String then proccessing them one by one using rs.NextRecordset (rs is the Recordset), here is an example: ADO NextRecordset Method Demonstration

But, personally, i prefer doing it as you're doing it now, using just one recordset for each query. Take into account that using multiple recordsets inside one, like in the previous example may require some additional commands in some dbs to ensure no additional unwanted recordsets are created from messages coming from the backend, for example for Sql Server it's a good idea using: 

Set NoCount On and Set ANSI_Warnings OFF



{'source': 'StackExchangeDataset', 'subset': 'stackoverflow.com', 'metadata': {'AnswerCount': 1, 'CommentCount': 0, 'ContentLicense': 'CC BY-SA 3.0', 'CreationDate': '2012:00:06/18/12', 'FavoriteCount': None, 'PostTypeId': 1, 'Tags': '<vb.net><adodb>', 'Title': 'How can we do Multiple Operations using Single RecordSet?', 'ViewCount': 1546, 'id': 11083468, 'user_AboutMe': '<p>Passionate about developing community, evangelizing technology and, giving enthusiastic technical presentations with exceptional skills at developing and fostering personal relationships.\nHaving working professional having 7+ years of experience on .NET technologies like C#.NET,VB.NET,ASP.NET MVC,jQuery,JavaScript,HTML,AngularJs and CSS. I can do this task with in the given time-line as per the requirement. Beyond application development, I am skilled in high-level requirements gathering, risk analysis, technical design analysis, application modelling, implementation planning, and support.</p>\n', 'user_AccountId': 179965.0, 'user_DisplayName': 'Hemant Kumar', 'user_Reputation': 4533.0, 'user_Views': 622.0, 'user_id': 412982.0}}