I am trying to get all results with the MySQL.Data Nuget because I am using MariaDB. But my Method just provides the first entry in my DB and does nothing more.
Public Function getAllFields(ByVal sql As String) As List(Of String)
Dim output As List(Of String) = New List(Of String)
Using cn = New MySqlConnection(connString.ToString())
Using cmd = New MySqlCommand(sql, cn)
cn.Open()
Using rd = cmd.ExecuteReader()
rd.Read()
Dim objs(rd.FieldCount) As Object
Dim quant As Integer = rd.GetValues(objs)
Dim i As Integer
For i = 0 To quant - 1
output.Add(objs(i))
Next i
rd.Close()
End Using
cn.Close()
End Using
End Using
Return output
End Function
While rd.Read() /*Codes*/ End While