Private Function autoGenOneKeyID(ByVal cum As String, ByVal t_Name As String) As Long
Dim sqlTmp As String = ""
Dim LastID As Int64 = 0
Dim NextID As Int64 = 1
sqlTmp = "SELECT " + cum + " FROM " + t_Name
sqlTmp += " ORDER BY " + cum + " DESC LIMIT 1"
Try
Dim DS As DataSet = ReadDbMysql(sqlTmp, "Obj")
LastID = Convert.ToInt64(DS.Tables("Obj").Rows(0).Item(cum))
LastID += 1
NextID = LastID
Catch
End Try
Return NextID
End Function