I am using an AVG function in SQL
VB Code:
Dim myCommand2 As New OleDb.OleDbCommand( "SELECT AVG(diastolic)from cycles", myConnection)
Then I use this code:
VB Code:
myReader1 = myCommand2.ExecuteReader If myReader1.Read = True Then Label6 = myReader1.Item(0) End If myReader1.Close()
but it gives me "specified cast is not valid" error!
Any ideas??
Thanks,
Bebandit
Ok...Got it
Label6.Text = (myReader.GetDouble(0).ToString())
because it is a long integer that i am retrieving....




Reply With Quote