[VB.NET]得到查询的返回值?

前端之家收集整理的这篇文章主要介绍了[VB.NET]得到查询的返回值?前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
得到查询的返回值? 就像ASP里面的request一样 比如数据库里的ID和PWD两列 我现在执行 Dim str As String = SLECET pwd FROM STU_TABLE WHERE ID= + uid.Text + ; Dim sqlcmd As System.Data.OleDb.OleDbCommand = New System.Data.OleDb.OleDbCommand(str,OleDbConnection1) sqlcmd.ExecuteNonQuery() PWD是一个字符串,怎样得到查询得到的PWD? __________________________________________________________________________ up __________________________________________________________________________ up __________________________________________________________________________ string pass = sqlcmd.ExecuteScalar().ToString(); __________________________________________________________________________ string pass = Convert.ToString(sqlcmd.ExecuteScalar()) __________________________________________________________________________ dim aa as string string aa =Convert.ToString(sqlcmd.ExecuteScalar) __________________________________________________________________________ sqlcmd.ExecuteScalar返回查询结果的第一行第一列 __________________________________________________________________________ 原文链接:https://www.f2er.com/vb/263495.html

猜你在找的VB相关文章