I have this code in VB6 but i don't know how to do it in VB.NET.

With rsMean_SD

'get the Mean

Set rs = Db.OpenRecordset("SELECT AVG(TOTAL_RS) AS Mean from tblResult")

.AddNew

!Mean = rs!Mean

.Update

'get the SD

Set rs = Db.OpenRecordset("SELECT STDEV(TOTAL_RS) AS SD from tblResult")

.MoveFirst

.Edit

!SD = Round(rs!SD, 4)

.Update

End With