Private Function getmax()
        Dim no As Integer
        Dim str1 As String
        str1 = "select max(CD) from Item"
        cmd1.Connection = con
        cmd1.CommandType = CommandType.Text
        cmd1.CommandText = str1
        con.Open()
        no = cmd1.ExecuteScalar()
        If no = 0 Then
            no = 1
        Else
            no = no + 1
        End If
        Return no
    End Function
   

   


Like it on Facebook, Tweet it or share this article on other bookmarking websites.

Comments (0)

There are no comments posted here yet