Fetch array with ms access

superbem

Member
Joined
May 17, 2007
Messages
22
Programming Experience
10+
Hello, this is my first post here, seems a very good forum.

I'm new to vb.net, and I came from PHP and mysql.

I'm connecting from vb to msaccess by code, but I can't yet figure how I do a fetch array from a select command in vb.net.

Can someone help me?
 
Last edited:
ok I solved it:

PHP:
    Public Sub CreateMyOleDbDataReader(ByVal mySelectQuery As String, _
    ByVal myConnectionString As String)
        Dim myConnection As New OleDbConnection(myConnectionString)
        Dim myCommand As New OleDbCommand(mySelectQuery, myConnection)
        myConnection.Open()
        Dim myReader As OleDbDataReader = myCommand.ExecuteReader(CommandBehavior.CloseConnection)
        While myReader.Read()
            MsgBox(myReader("FieldName").ToString)
        End While
        myReader.Close()
        End Sub
 
Back
Top