中间对数据库操作使用的是:SqlHelper.vb Imports System.Data Imports System.Data.SqlClient Public Class UserClass Dim sql As String Public Function Add(ByVal dm As Object) As Boolean Dim pr(10) As SqlParameter sql = "insert into tbl() values " sql = sql & "()" If SQLHelperExt.ExecuteNonQuery(sql, pr) >= 1 Then Return True Else Return False End If End Function Public Function Update(ByVal dm As Object) As Boolean Dim pr(10) As SqlParameter sql = "update tbl set x=@x where id=" & dm If SQLHelperExt.ExecuteNonQuery(sql, pr) >= 1 Then Return True Else Return False End If End Function Public Function Delete(ByVal id As String) As Boolean sql = "delete from tbl where id=" & id sql = "update tbl set strStatus='void' where id=" & id SQLHelperExt.ExecuteNonQuery(sql) End Function Public Function CheckRsExist(ByVal id As String) As Boolean sql = "select 1 from tbl where id=" & id Return SQLHelperExt.CheckRsExist(sql) End Function Public Function GetTable() As DataTable Return Me.GetTable("") End Function Public Function GetTable(ByVal id As String) As DataTable Return Nothing End Function Public Function GetTableCN() As DataTable Return Me.GetTableCN("") End Function Public Function GetTableCN(ByVal id As String) As DataTable Return Nothing End Function End Class