标题:Update语法会有错吗???
取消只看楼主
guming
Rank: 4
等 级:业余侠客
威 望:5
帖 子:329
专家分:277
注 册:2006-11-9
结帖率:50%
 问题点数:0 回复次数:1 
Update语法会有错吗???

void btnok_Click(Object Sender,System.EventArgs e)
{
OleDbConnection thisConnection=new OleDbConnection(@"Provider=Microsoft.Jet.OLEDB.4.0;Data Source="+Server.MapPath("../../dbs/webdata.mdb")+"");
thisConnection.Open();
OleDbCommand thisCMD=thisConnection.CreateCommand();
thisCMD.CommandText="Select password from logings where password='"+this.oldpsw.Text+"'";
OleDbDataReader thisReader=thisCMD.ExecuteReader();
if(thisReader.Read())
{
int b=1;
thisReader.Close();
thisCMD.CommandText="Update logings set password='"+this.newpsw.Text+"' where id="+b+"";
thisCMD.ExecuteNonQuery();
}
else
{lb4.Visible=true;}
thisConnection.Close();
}

搜索更多相关主题的帖子: 语法 Update 
2006-11-09 01:39
guming
Rank: 4
等 级:业余侠客
威 望:5
帖 子:329
专家分:277
注 册:2006-11-9
得分:0 
怎么没人能答吗?????????

不想停留。。。
2006-11-09 01:54



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-101652-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 2.556991 second(s), 8 queries.
Copyright©2004-2025, BCCN.NET, All Rights Reserved