tags:

views:

9

answers:

1

i am using vb.net2005 and ms sql server2005 i want source code for autogenerate the empid in my table . for example' sb1001'

+3  A: 

The simplest answer to your question is:

      For x As Integer = 0 To dt.Rows.Count - 1
        dt.Rows(x)("emp_id") = "sb" & x
      Next

dt represents your datatable

Michael Eakins