|
-
Dec 29th, 2003, 07:43 AM
#1
Thread Starter
Hyperactive Member
What?? Disconnected recordset?
Hi there!
I am in the process of porting a huge ASP application to ASP.NET. In most of the ASP pages, I have used a COM component to retrieve a ADO disconnected recordset. (This way, I have avoided opening connection in ASP pages).
Now, I am willing to port COM components into .NET components. In that regard, I want to rewrite my components to use ADO.NET. However I couldn't find any object to replace the 'disconnected readonly ADO recordset' in ADO.NET. I know I can use DataReader, but that is 'connected' to the DB & hence I would prefer not to use that.
Can you please tell me is there anyway I can return a disconnected recordset (or anyother similar object) to ASPX pages, from which I can loop thru' the recordset & do other HTML stuff?
Thanks,
Last edited by jeba; Dec 29th, 2003 at 07:56 AM.
J£ßä
-
Dec 29th, 2003, 09:45 AM
#2
Frenzied Member
Use a DataSet.
Example:
VB Code:
Dim dsAuthors As DataSet
Dim conAuthors As OleDbConnection
Dim daAuthors As OleDbDataAdapter
dsAuthors = New DataSet()
conAuthors = New OleDbConnection("PROVIDER=Microsoft.Jet.OLEDB.4.0;DATASource=c:\Authors.mdb")
daAuthors = New OleDbDataAdapter("SELECT * FROM Authors", conAuthors)
daAuthors.Fill(dsAuthors, "Authors")
'Bind a datagrid
dgAuthors.DataSource = dsAuthors
dgAuthors.DataBind()
Last edited by Memnoch1207; Dec 29th, 2003 at 09:52 AM.
Being educated does not make you intelligent.
Need a weekend getaway??? Come Visit
-
Dec 29th, 2003, 11:51 PM
#3
Thread Starter
Hyperactive Member
Hi Memnoch1207,
Thanks for the reply, but I don't want to use the ASP.NET Datagrid, because that involves quite a lot of change in the ASPX pages. [FYI, I am just saving ASP pages as ASPX & fix the errors, if any arises, because there are more than 300 ASP pages in the application, and we can't afford to 'really' convert ASP pages to make use of the powerful features of .NET at this time.]
All that I want is a 'disconnected recordset' kind of object in the front end (ASPX pages).
-
Dec 30th, 2003, 09:26 AM
#4
Frenzied Member
everything above the bind datagrid code...is disconnected. DataSets in .NET are disconnected recordsets.
Being educated does not make you intelligent.
Need a weekend getaway??? Come Visit
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|