I'm using an ODBC Adapter with a MySQL Data connection to retrieve information from my database, and the example I was given doesn't quite explain how to get the data into an array as well as the total records retrieved. All I have is:
I don't quite understand what a DataSet is or what I can do with a datagrid, but all this does is put the data in a table, but I want to be able to separate the content out. How do I do that?
_______________
_brian.
Code:
Dim category As String = Request.QueryString("c")
Dim page As String = Request.QueryString("p")
Dim sSQL As String = "SELECT * FROM content LEFT JOIN categories ON content.category = categories.categoryid WHERE categories.cat_name = '" & category & "' AND content.name = '" & page & "' AND content.deleted <> '1' LIMIT 0,1"
Dim oDataAdapter As ODBCDataAdapter = New ODBCDataAdapter(sSQL, oConnection)
Dim oDataSet As DataSet = New DataSet()
oDataAdapter.Fill(oDataSet)
oDataGrid.DataSource = oDataSet
_______________
_brian.