My first db application works with this code to run SQL commands:
Code: Code:
Dim RS As New ADODB.Recordset Dim DS As New DataSet Dim OL As New OleDb.OleDbDataAdapter '........ Other codes... Private Function GetInfo() As Boolean On Error GoTo Err DS.Tables.Add(TableCostumers) OL.Fill(DS.Tables(TableCostumers), RS) DS.DataSetName = CN.ConnectionString DGW.DataSource = DS.Tables(TableCostumers) Return True Exit Function Err: MsgBox("...", MsgBoxStyle.Critical, AppTitle) Return False End Function
Now I want to change it to ADO.Net without big changes. Idea is that my applciation generates SQL commands and gets info like the code in this post. I don't want to make big changes. Actually I only want to eliminate recordset, because I dont want that anything stay from ADODB...
How can I do that?




Reply With Quote