本文介绍了重新初始化数据库表的id列的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有人可以给我打电话的代码,当表为空时再次从1重新初始化id列.我正在使用sql express作为我的后端...我尝试了这段代码:

can anybody tel me the code for re-initializing the id column from 1 again when the table is made empty.i am using sql express as my back end ...i tried this code:

 <pre lang="vb">Private Sub DataGridView1_CellContentClick(ByVal sender As System.Object, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles DataGridView1.CellContentClick
        Dim i As Integer
        i = DataGridView1.CurrentRow.Index
        TxtId.Text = DataGridView1.Item(0, i).Value
        TxtUsername.Text = DataGridView1.Item(1, i).Value
        TxtPassword.Text = DataGridView1.Item(2, i).Value
        If DataGridView1.Item(0, 0).Value = vbEmpty Then
            DataGridView1.Item(0, 0).Value=initialize
End If</pre>

推荐答案


这篇关于重新初始化数据库表的id列的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-22 02:21