hi guys i have problem with my code
here is my code
Public Sub increment()
Dim dr As SqlDataReader
If con.State = ConnectionState.Closed Then
con.ConnectionString = (strconnection)
con.Open()
End If
Dim str As String = "Select CUSTOMERID from tbl_Customer"
cmd = New SqlCommand(str, objconnection)
dr = cmd.ExecuteReader
While (dr.Read())
TXTCUSTOMERD.Text = (dr.Item("CUSTOMERID"))
End While
If TXTCUSTOMERD.Text = "" Then
TXTCUSTOMERD.Text = 0
TXTCUSTOMERD.Text = Val(TXTCUSTOMERD.Text) + 1
Else
TXTCUSTOMERD.Text = Val(TXTCUSTOMERD.Text) + 1
End If
dr.Close()
End Sub
pls. i need your help regarding this..
God bless!