Dim DBall As New SqlConnection("SQLkeyStr")
DBall.Open()
Dim cmd As New SqlCommand("Select Count(ID) from [xxx]", DBall)
Dim getNumber as Integer = CType(cmd.ExecuteScalar(),Integer)http://expert.csdn.net/Expert/topic/1279/1279997.xml?temp=4.746646E-02
DBall.Open()
Dim cmd As New SqlCommand("Select Count(ID) from [xxx]", DBall)
Dim getNumber as Integer = CType(cmd.ExecuteScalar(),Integer)http://expert.csdn.net/Expert/topic/1279/1279997.xml?temp=4.746646E-02
con.ConnectString="....";
con.Open();
string str;
str= "Select Count(ID) from [xxx]";
SqlCommand cm = new SqlCommand(str,con);int icount=int.parse(cmd.ExecuteScalar().ToString());
str= "Select Count(ID) from [xxx]";
OleDbCommand cm = new OleDbCommand(str,con);string icount=cm.ExecuteScalar().ToString();
show.Text=icount;
没有显示出记录,何故,速帮忙!!!