asp.net ÊÂÎñÀý×Ó
protected void Button1_Click(object sender, EventArgs e)
{
SqlConnection conn;
SqlCommand cmd1, cmd2;
SqlTransaction tra;
conn = new SqlConnection("server=.;database=test;uid=sa;pwd=123");
conn.Open();
tra = conn.BeginTransaction();//¿ªÊ¼ÊÂÎñ
cmd1 = new SqlCommand("update Test set StuName='¼Ñ¶ù' where StuScore=111", conn);
cmd2 = new SqlCommand("update Test set StuName='fdsafdsafdsfdsafsfsdadsadsadfsafsfsfdf' where StuScore=222", conn);
try
{
cmd1.ExecuteNonQuery();//´Ë¾ä¿ÉÒԳɹ¦Ö´ÐÐ
cmd2.ExecuteNonQuery();//´Ë¾ä¹ÊÒâÈÃÆäÖ´ÐÐʧ°Ü
tra.Commit();//ÎÞÒì³££¬Ìá½»ÊÂÎñ(Á½¾äÖ´Ðж¼ÓÐЧ)
Response.Write("<mce:script type="text/javascript"><!--
alert('Ö´Ðгɹ¦')
// --></mce:script>");
}
catch
{
tra.Rollback();//³öÏÖÒì³££¬»Ø¹öÊÂÎñ(Á½¾äÖ´Ðж¼ÎÞЧ)
Response.Write("<mce:script type="text/javascript"><!--
alert('Ö´ÐÐʧ°Ü')
// --></mce:script>");
}
finally
{
conn.Close();
}
} 0 0 0
(ÇëÄú¶ÔÎÄÕÂ×ö³öÆÀ¼Û)
Ïà¹ØÎĵµ£º
protected void Button6_Click(object sender, EventArgs e)
{
this.Label11.Text = HtmlEncode(this.TextBox3.Text);
}
protected static string HtmlEn ......
OCIEnvNlsCreate ʧ°Ü£¬·µ»Ø´úÂëΪ -1£¬µ«´íÎóÏûÏ¢Îı¾²»¿ÉÓá£
2009-09-20 02:10
“System.Data.OracleClient ÐèÒª Oracle ¿Í»§¶ËÈí¼þ 8.1.7 »ò¸ü¸ß°æ±¾ ”
µÄ´¦Àí·½·¨Ó¦¸ÃÏàËÆ£¬Ã»¾ßÌåÊÔ¹ý¡£
¸øoracle/ora92µÄĿ¼¼ÓÉÏnetwork serviceÓû§µÄȨÏ޾ͿÉÒÔÁË¡£
·½·¨£ºÓÒ»÷ora92£¬Ñ¡ÔñÊôÐÔ£¬µã»÷“°²È«&rd ......
ÍøÕ¾ÎļþÃû£º
1¡¢ ÍøÕ¾ÎļþÃûÒÔ±ê×¼Ó¢Îĵ¥´ÊÃèÊöÒµÎñÄÚÈÝ¡£Èç¹û1¸öÓ¢Îĵ¥´ÊÎÞ·¨ÃèÊö£¬¿ÉÒÔÔö¼Ó2¸ö»òÕß3¸ö£¬µ«¾¡Á¿ÎªÍêÈ«µ¥´Ê£¬ÀýÈçarticle.aspx/ articleView.aspx / articleList.aspx µÈ¡£
2¡¢ ÎļþÃû¾¡Á¿²»ÓÃÊý×ÖÃèÊö¡£
3¡¢ ÎļþÃû¾¡Á¿²»ÄÜÌ«³¤£¬ÒÔ²»³¬¹ý20¸ö×ÖĸΪÒË¡£
4¡¢ ͼƬÎļþÃû¾¡Á¿ÃèÊöÍ ......
1¡¢Í¨¹ý¸½¼ÓÒ»¸öcookiecontainerµ½httprequest¶ÔÏóÖУ¬¿ÉÒԵõ½µÇ¼ºó·µ»ØµÄ´ú±íSESSION IDµÄCOOKIE¡£
2¡¢½«´ËCOOKIE°üº¬ÔÚÒ»¸öcookiecontainerÖв¢¸½¼Óµ½ÁíÒ»¸öHTTPREQUESTÇëÇóÖУ¬Ôò¿ÉÒÔʵÏÖSESSIONµÄ»¹Ô¡£
²¿·ÖÖ÷Òª´úÂ룺
CookieContainer cookieContainer =& ......
Ò»¡¢
Js
ÉèÖÃĬÈÏ°´Å¥
function
document.onkeydown()
{
var
e=event
.srcElement;
&nbs ......