Results 1 to 4 of 4

Thread: What?? Disconnected recordset?

  1. #1

    Thread Starter
    Hyperactive Member jeba's Avatar
    Join Date
    Feb 2000
    Posts
    265

    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£ßä

  2. #2
    Frenzied Member Memnoch1207's Avatar
    Join Date
    Feb 2002
    Location
    DUH, Guess...Hint: It's really hot!
    Posts
    1,861
    Use a DataSet.
    Example:
    VB Code:
    1. Dim dsAuthors As DataSet
    2. Dim conAuthors As OleDbConnection
    3. Dim daAuthors As OleDbDataAdapter
    4.  
    5. dsAuthors = New DataSet()
    6. conAuthors = New OleDbConnection("PROVIDER=Microsoft.Jet.OLEDB.4.0;DATASource=c:\Authors.mdb")
    7. daAuthors = New OleDbDataAdapter("SELECT * FROM Authors", conAuthors)
    8. daAuthors.Fill(dsAuthors, "Authors")
    9.  
    10. 'Bind a datagrid
    11. dgAuthors.DataSource = dsAuthors
    12. 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

  3. #3

    Thread Starter
    Hyperactive Member jeba's Avatar
    Join Date
    Feb 2000
    Posts
    265
    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).
    J£ßä

  4. #4
    Frenzied Member Memnoch1207's Avatar
    Join Date
    Feb 2002
    Location
    DUH, Guess...Hint: It's really hot!
    Posts
    1,861
    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
  •  



Click Here to Expand Forum to Full Width