Converting .NET ADO Dataset to ADO Recordset

Hi Experts,

I have a .NET dataset and I have to convert it to an ADO Recordset to call a method of an ocx because the parameter of this method is an ADO recordset. How can I do that ???
Here is my function where I have to convert

Public Sub DisplayAgentStats()
Dim objConnection As SqlConnection
Dim objCommand As SqlDataAdapter
Dim sConnStr As String
Dim sSQL As String
Dim ds As New DataSet()
Dim ReturnCode As Integer
sConnStr = "server=ServerA;database=DB1;uid=sa"
sSQL = "select Id, LastName, FirstName FROM Agents"
objConnection = New SqlConnection(sConnStr)
objCommand = New SqlDataAdapter(sSQL, objConnection)
objCommand.Fill(ds, "DB")
'--> Here I need to convert the .NET dataset called "ds" to an ADO Recordset
'--> because the parameter in function "myOCX.CalculateAgentStats"
'--> is an ADO Recordset.
ReturnCode = myOCX.CalculateAgentStats(mADODBRS)
End Sub

Thanks !
8/18/2003 6:51:30 PM 16182 articles. 0 followers. Follow

2 Replies

Similar Articles

[PageSpeed] 47

May be it is easy for you to get a recordset by using  ADO COM object in .net .
This posting is provided "AS IS" with no warranties, and confers no rights.
8/18/2003 8:44:49 PM
You cannot directly convert or cast any ASP.NET object to a Recordset. Your best option is probably to use an ADO recordset to start with. If you have to use a datatable, your only real choice is to manually create the recordset by appending a new field to the recordset object for each column in the datatable, then manually adding each new row and setting the correct values. This will be very inefficient, especially for large sets of data.

8/18/2003 9:24:48 PM

Similar Artilces:

Converting ADO to ADO.NET
Hi, I am trying to convert this code from ADO to ADO.NET I am very new to ADO.NET and am a bit confused on how I would convert this. Basically what I am trying to do is capture the name of the fields of a table to populate a dropdownlistbox. The table name will change every time the program is run. This is not a problem and I can code for that. Here is what I have in ADO (I have tried the wizard but it did not change the code) Dim tblFields As Object Dim myRst As New ADODB.Recordset Dim myField As ADODB.Field Dim myCnn As New ADODB.C...

Does .NET map calls for ADO to ADO.NET?
Hello,We are trying to troubleshoot some DB problems from COM objects that call ADO. I heard that when ADO is loaded inside of a COM object by a .NET app, that .NET intercepts the call and re-maps those calls over to ADO.NET. This seems untrue to me, given the nature of ADO.NET being a totally separate technology.Does anyone know for sure whether this does or does not occur?The problem we are seeing is actually almost identical in symptoms to this:"FIX: Data Queries Sporadically Return Empty Recordsets" Literally, this is what...

ADO.NET equivalent to ADO recordset
I'm new to ASP.NET 2.0 and ADO.Net but have some experience with oldschool ASP and ADO :)My question is ADO.NET has an equivalent to ADO recordset?In normal ADO I use to read and compare database cells 1 set User= Server.CreateObject("ADODB.Recordset") 2 User_sql = "SELECT * FROM tblUsers WHERE UserName='" & Request.Form("UserName") & "'" 3 User_sql, Conn 4 5 if User("Password") = Request.form("Password") then 6 Response.write(User("Password"))7 end if ...

I am writing a database interface and I would like to know whether a VB6 interface using ADO or a VB.NET interface using ADO.NET would be faster in terms of just performing database operations. Is there an explanation for this, and what is the magnitude of the difference? Thanks in advance!...

Hi, I have to connect to a db using adodb (which i select from the references). I have to retrieve the car models from the database and bind them to a listbox. I am not sure how to proceed and I can't find any articles on ADO with .net and data binding. Here is the code that i tried but it only retrieves the car model for the specified id. If I delete the id it doesn't work. Also it writes the car model in the listbox vertically such as: B M W CODE: Imports System.Data Imports ADODB Imports System.Data.OleDb Public Class listboxADO Inherits System.Web.UI...

I'm an ASP programmer (VBScript) moving on to ASP.NET. So far I'm using:Microsoft Visual Studio 2003ASP.NET with C#I'm working on converting my code over to C#, from VBScript. Now, here is my code in VBScript (modified to better understand it, this is a edited ugly version):Function ExecuteSQL(sqlStatement)    ConnDriver = "Provider=SQLOLEDB; Data Source = " & dbIP & "; Initial Catalog = " & dbName & "; User Id = " & dbUser & "; Password=" & dbPassword     Set connTemp = Server.CreateObject("ADODB.Connection")    c...

how to cast a Recordset from ADO to a ADO.NET Data Struct
Hi! can somebody tell me how to cast a Recordset from ADO to a ADO.NET Data Struct the ado recordset is in a dll that is called from an app that is being build in C#.NET Thanks in advance Luis Diego Rojas You can't. You can only cast objects that inherit from the same base class (oversimplification, but that's the gist of it). It sounds like you want to convert it from a recordset to something else in .NET, right? What do you want it as? XML data? A data set? Something else? Give us more information and we'll try to help. DonDon Kiely, MC...

ADO.NET Visual Studio 2005 Install Help!, ADO.NET Missing
 Hi everyoneI have a real annoying problem, I have installed Visual Studio 2005 with C#,C++,Web Applications.. Before I installed VS2005 I made sure I had all the .Net Download from 1.1 to 3.5 with the Service Packs, I also Installed a VS2005 Patch that was around 430mb. I have tried this on 3 computers, two of XP and 1 vista.I need ADO.NET Functionality, When I choose to create a Web Application in C#, I require the ADO.NET Entity Data Model as it will allow for a graphical interaction with a SQL db. However When I Choose Add New Item in Solution explorer there is no ENtity Mode...

Innovation to ADO.NET
Matisse Software Inc. provides its native ADO.NET Data provider for Matisse 6.0, the Database for .NET. Matisse Software has pushed the envelope of Microsoft ADO.NET architecture and extended it into a powerful Object Access Services component for .NET. Matisse’s extension of ADO.NET demonstrates that ADO.NET can evolve beyond the Microsoft architecture to benefit .NET developers. Unlike the standard ADO.NET data provider, which returns data in a table format to integrate seamlessly with relational products, Matisse has extended the ADO.NET architecture to return data in an object format....

using an ADO.NET dataset as a datasource for RS
Hi all, Is it possible to use an ADO.NET dataset (as opposed to a Reporting Services dataset) as a datasource in Reporting Services? Thanks. Mike unless I misunderstood your question, I dont think they are different. what xactly is your question.***********************Dinakar NethiLife is short. Enjoy it.*********************** Yes, they are different. The datasource of a Reporting Services report is called (unfortunately) a "dataset," which is different than a dataset in ADO.NET. My question is as follows: let's say, for example, that I create an ADO.NET dataset in V... or/and
Hi, Can work with Sybase's or are they not compatible with each other. We have two separate groups of developers, one group develops web apps using ASE as the back end for the data, so they use a combination of Visual Studio ..NET and Sybase's to do their work. We have another group that develops client/server apps using Powerbuilder, but since 80% of their work is in writting reports using Powerbuilder, I was wondering if they could use a combination of and to put make these reports available on the web through ...

Convert Delphi 5 ADO App to Delphi 2007 ADO.NET
I have an appliction tha that is writen in Delphi 5 with ADOConnetion, ADOTable, and ADOQuery components. I need to upgrade to Delphi 2007 and use ADO.NET. I have the program building in with Delphi 2007. Is there anything I need to do to convert the ADO to ADO.NET? > I need to upgrade to Delphi 2007 and use ADO.NET. Why ? -- With best regards, Dmitry Arefiev AnyDAC ( - Oracle, MS SQL Server, IBM DB2, MySQL, Firebird, Interbase, PostgreSQL, Sybase ASA, SQLite, MS Access, DBX, ODBC, InMem - universal high-speed native data access engine Reasons for ...

Opinions about ADO and ADO.NET
Hi everyone again!!! I´m used to develope applications with ADO, but now with .NET to develope a Web Application and a Mobile Web Application, I don't know if I have to use ADO.NET or continue using ADO. What Disadvantages has ADO to built Mobile Applications? In ADO I use ACCESS to create the .mdb files, Can I use .mdb files with ADO.NET? Thanks for all!! Go to ADO.NET NOW ! don't be late and you can use access in ADO.NET VB.NET/C#/ASP.NET/Oracle Designer 6i Building a custom web control( Well, Thanks for your opinion, but I have...

ADO to ADO.NET help
Hi, I am converting application ASP to ASP.NET.What is the equivalent code in ADO.NET. For each F in RS.Fields FieldName = F.Name Next Thanks, Nate If it is forward only, then you can use datareader for more info on this, check below link Datareader on MSDN Hope it helps!Sreedharhttp://www.w3coder.orgweblog

Web resources about - Converting .NET ADO Dataset to ADO Recordset -

Facebook Begins Converting Users To HTTPS
Are you willing to sacrifice a little bit of speed for a lot more safety? Facebook is asking that very question with its announcement that it ...

Facebook No Longer Converting Groups Into Pages
Back when Facebook first launched Facebook Pages, many businesses and brands who had built up substantial audiences in their Facebook Groups ...

Vert - simply converting for iPhone, iPad, and iPod touch on the iTunes App Store
Get Vert - simply converting on the App Store. See screenshots and ratings, and read customer reviews.

Converting SIM Card to Micro SIM Card - Flickr - Photo Sharing!
Place new Micro SIM into the iPhone SIM card tray

Ayaan Hirsi Ali on Converting Muslims to Christianity - YouTube
Complete video at: Ayaan Hirsi Ali explains her support of missionary ...

Click go fears of converting print files
Is there a way to convert a print queue item to a .RTF or .PDF file? I like to save or email them. - The Sydney Morning Herald

Sudanese woman ordered to hang under sharia law for converting to Christianity gives birth
Khartoum, Sudan: A Christian Sudanese woman sentenced to hang for apostasy has given birth in jail, a Western diplomat said on Tuesday.

Imams warn against radicalism to Aboriginal inmates converting to Islam
The prison system has enlisted the help of ASIO to crack down on radicalisation behind bars amid revelations that Aboriginals are converting ...

Converting the world's companies one by one - The Science Show - ABC Radio National (Australian Broadcasting ...
Image: Trucks carrying logs make their way up a road in Jambi, Indonesia. A vast area of the Sumatran forest, and orangutan habitat, is being ...

Rothesay building new arena, converting existing rink to fieldhouse
The Town of Rothesay plans to build a new arena and convert the existing one into a fieldhouse.

Resources last updated: 1/14/2016 7:19:43 AM