Hi this is my code for computing the payment of my system, But there have a problem in my codes ? Because, there have something wrong my codes, i try to fix the error but i can't, this is the error " Conversation from type 'DBNul' to type 'Integer' is not valid" how to fix this error ?
[
Private sub Booktotal()
Dim booktot as Integer
Dim subtot as Integer
sql = *SELECT Sum (Bookamount) FROM books*
myconn.Open()
cmd = New OleDbCommand(sql, myconn)
dr = cmd.ExecuteReader(CommandBehavior.CloseConnection)
If dr.Read = True Then
booktot = dr(0)
subtot += booktot
end if
end sub
](null)