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

god_5203 2011-12-22 11:06:57
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();
}
...全文
57 1 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
1 条回复
切换为时间正序
请发表友善的回复…
发表回复
我心飞翔 2011-12-22
  • 打赏
  • 举报
回复
加断点,分步调试一下,看看具体的执行情况。

17,140

社区成员

发帖
与我相关
我的任务
社区描述
Oracle开发相关技术讨论
社区管理员
  • 开发
  • Lucifer三思而后行
  • 卖水果的net
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧