• SQLdr.Read would move the pointer to the next row; my code is very similar to yours, so i think RBarryYoung is right...it seems like you have a boatload of rows?

    Dim myConn As New SqlConnection

    myConn.ConnectionString = mySqlTrustedConnectionFormat

    myConn.Open()

    Dim sql As String

    sql = "SELECT " & vbCrLf

    sql = sql & " USER_ID() AS [USER_ID], " & vbCrLf

    sql = sql & " USER_NAME() AS [USER_NAME], " & vbCrLf

    sql = sql & " SUSER_ID() AS [SUSER_ID], " & vbCrLf

    sql = sql & " SUSER_SNAME() AS [SUSER_SNAME], " & vbCrLf

    sql = sql & " IS_SRVROLEMEMBER ('sysadmin') AS [Is_ServerAdmin_Sysadmin], " & vbCrLf

    sql = sql & " IS_MEMBER('db_owner') AS [Is_DB_owner], " & vbCrLf

    sql = sql & " IS_MEMBER('db_ddladmin') AS [Is_DDL_Admin], " & vbCrLf

    sql = sql & " IS_MEMBER('db_datareader') AS [Is_DB_Datareader], " & vbCrLf

    sql = sql & " ORIGINAL_LOGIN() AS [ORIGINAL_LOGIN] " & vbCrLf

    Dim myCommand = New SqlCommand(sql, myConn)

    Dim myreader As SqlDataReader

    myreader = myCommand.ExecuteReader()

    While myreader.Read

    results = results & RPad(TheServer, 20) & RPad(myreader!SUSER_SNAME, 20) & IIf(myreader!Is_ServerAdmin_Sysadmin = 1, "ServerAdmin", "User") & vbCrLf

    End While

    myreader.Close()

    myConn.Close()

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!