ASP.NET oracle 语句在执行更新的时候没有任何反映不知道咱回事?

god_5203 god_5203 墨衍会员 · AI 创作全网分发 墨衍智能分发 通过墨衍一键同步至各平台 可同步平台 CSDN微信公众号微博知乎掘金百家号博客园抖音小红书 你的文章也可以这样分发 墨衍会员 ¥399起/年,写一次发全网 我也要 + 加入社区
string logip = Request.UserHostAddress;
DateTime now = DateTime.Now; //注册时间
string time = now.Year.ToString().Trim() + "-" + now.Month.ToString().Trim() + "-" + now.Day.ToString().Trim() + " " + now.Hour.ToString().Trim() + ":" + now.Minute.ToString() + ":" + now.Second.ToString();

OracleConnection con = OraDBHelper.init();
try
{
string sql2 = "update userinfo set endlogintime=to_date('" + time + "','yyyy-mm-dd hh24-mi:ss'),endloginIP='" + logip + "',lgoinnum=lgoinnum+1 where username='godlove'";
OracleCommand daset = new OracleCommand(sql2,con);
int i = Convert.ToInt32(daset.ExecuteNonQuery());
if (i != 0)
{
Response.Write("ok");
}
else
{
Response.Write("error");
}
}
catch (Exception e)
{
throw new Exception(e.Message.ToString());
}
finally
{
con.Close();
}
...全文

相关推荐

评论 1
收藏 已收藏
分享
返回顶部
god_5203
Oracle 17,133 成员 55,258 内容