How can I get a simple return of data from my DB using ASP.NET (VB.NET). In classic ASP I'd do something like this:
What would be the .NET equivalent to that ?
"Taxes are the fees we pay for civilized society" G.W.
Code:
SQL = "SELECT COUNT(ID) AS C_COUNT FROM table"
Set RS = Server.CreateObject("ADODB.Recordset")
RS.Open SQL, MyConn
IF NOT RS.EOF THEN
COUNTER = trim(RS("C_COUNT"))
END IF
RS.Close
SQL = "SELECT SUM(fldNUM) AS S_SUM FROM table"
Set RS = Server.CreateObject("ADODB.Recordset")
RS.Open SQL, MyConn
IF NOT RS.EOF THEN
SUMMARY = trim(RS("S_SUM"))
END IF
RS.Close
Set RS = Nothing
What would be the .NET equivalent to that ?
"Taxes are the fees we pay for civilized society" G.W.