ExecuteScalar - Error - URGENT
Please Correct this Error
VB Code:
dim MaxNo,RCount as integer
SQL= "Select IsNull(Max(RptID),0)+1,count(*) from RptMain"
MyConnection = New SqlConnection(Application("Constr"))
mycmd=New SqlCommand(SQL,MyConnection)
MyConnection.open()
[COLOR=red]MaxNo = mycmd.ExecuteScalar(0)[/COLOR]
RCount = mycmd.ExecuteScalar(1)
I got the following Error
Error line i mention it as Red color
System.MissingMemberException: No default member found for type 'Integer'.
Please Help me