Results 1 to 2 of 2

Thread: VB.NET - getting data from Recordset

  1. #1

    Thread Starter
    Addicted Member craigreilly's Avatar
    Join Date
    Jul 2004
    Location
    Scottsdale, AZ
    Posts
    188

    Resolved VB.NET - getting data from Recordset

    Converting to .NET from ver6
    I am having a lot of issues understanding the .NET way of working with DATA. Before, I could look up a dataset from Access, and then look at a particular Column name (ie: ACTIVE) to see if they are an authorized user.
    How can I do this in .NET?
    =====================
    Code:
    Dim db As Database
    Dim dblocation As String
    Dim ssql As String
    Dim rsusers As Recordset
    
    dblocation = App.Path & "\mtb.mdb"
    Set db = OpenDatabase(dblocation)
    
    ssql = "SELECT * FROM USERS where username = '" & mytext1 & "'"
    Set rsusers = db.OpenRecordset(ssql, dbOpenDynaset)
    
    If rsusers("ACTIVE") = True Then
    'If user Exists, check password, etc.
    elseif rsusers("ACTIVE")=False then
    'User is not authorized. Terminate program.
    end if
    Last edited by craigreilly; Oct 8th, 2004 at 06:24 PM.

  2. #2
    Addicted Member
    Join Date
    Aug 2003
    Posts
    153
    Hi,

    Recordsets are no longer used in VB.Net. What you will want to read up on is ADO.Net which is the new way .Net manages database data.

    http://msdn.microsoft.com/data/DataA...t/default.aspx

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