Hi I've been unwittingly using ADO without realising there was a difference between that and ADO.NET.
Anyway, I just want to try and switch to ADO.NET but i'm not really sure how to do it. I've gotten as far as below... made the connection to the database and everything went fine there. What do I do from here? I guess i need to put the data into a dataset and start working with it... how do i go about this? If I have a int column called 'Int1' and a string column called 'string1' for example, how do i go about looping through, extracting data etc...
Now, I've seen a second piece of code about this which i put at the end below, which seems to show how to create a dataset... although what confuses me here is that it seems to be creating it's own connection to the database? Some help please!
'Connection to database
Dim strConnection As String = "Provider=Microsoft.Jet.OLEDB.4.0;User ID=Admin;Data Source=" & "'" & Server.MapPath("~/App_Data/CTC Database.mdb") & "'"
Dim cnnRead As OleDbDataReader
strSQL = "SELECT * FROM([CTC Table])"
.Connection = New OleDbConnection(strConnection)
.CommandText = strSQL
cnnRead = .ExecuteReader()
'Second piece of code i've seen to create a dataset
Dim da As New OleDbDataAdapter(strSQL, strConnection)
Dim ds As New DataSet()