Results 1 to 2 of 2

Thread: VB.NET - getting data from Recordset

Threaded View

  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.

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