Hello Experts, I have decided to try and convert an application written in VB6 to .Net. I read and read and still do not understand this all completely so I am going to ask directly what I am looking for help with at this point. I do not want to use drag and drop data sources and datasets in the explorer. I want to do everything in code. In my application using DAO here is a common example of how I retrieve data. Please show me how to do the same thing in ADO.NET.
Dim db as database
Dim SQL as string
Dim rs as dao.recordset
Set db = opendatabase ("C:\MyDatabase.mdb")
SQL = "SELECT FirstName, LastName FROM Customers WHERE CustomerID = " & customerID & ""
set rs = currentdb.openrecordset(SQ
L)
if not rs.eof then
fillCustomerForm
elseif rs.eof then
msgbox "No Record Found"
end if
db.close
set db = nothing
rs.close
set rs = nothing
Start Free Trial