Sorry to all...
sqlite needs the Datareader also to be closed before trying to use the connection for other task.
I had used the connection for a select query in which I closed connection without closing reader.
the below code modification (Marked in Bold and Underlined) solved my problem
If Conn.State = ConnectionState.Open Then Conn.Close()
Conn.Open()
Dim ID As Integer = 0
Dim cmdDis As New SQLiteCommand("select coalesce(Max(Code),0) from mstrs where type='d'", Conn)
Dim Display As SQLiteDataReader = cmdDis.ExecuteReader()
If Display.HasRows Then
//do the stuff here......
End If
cmdDis.Dispose()
Display.Close()
If Conn.State = ConnectionState.Open Then Conn.Close()
End Sub
Regards
Santosh Sharma