首页 > 编程 > .NET > 正文

VB.net 查询获取数据库数据信息

2024-07-10 13:19:35
字体:
来源:转载
供稿:网友

复制代码 代码如下:


'数据操作执行
Public Sub getConn(ByVal SqlStr As String, ByVal TableName As String)
Try
objCommand.CommandText = SqlStr
objDataSet.Clear()
objDataAdapter.SelectCommand = objCommand
objDataAdapter.Fill(objDataSet, TableName)
Catch ex As Exception

MsgBox(ex.Message)
End Try
End Sub

发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表