标题
这里开始是内容:
最近几天才开始使用代码高亮,起初用的是SyntaxHighlighter,测试的时候发现在有些浏览器下会异常,但也没理它。然后今天打开网页却发现高亮没了,在任何浏览器下面都是这样,相当灵异的一件事情。于是换成WP-Syntax,至少在所有的浏览器下都显示一样了,还支持我所需要的语言。
代码:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | #region 执行Insert语句并返回自增长字段值 /// /// 执行Insert语句并返回自增长字段值 /// /// Insert语句、查询@@IDENTITY public static string RunSQLID( string SQLstr) { SQLcom = new SqlCommand(SQLstr, OpenConn()); try { string id = SQLcom.ExecuteScalar().ToString(); return id; } catch (Exception ex) { MessageBox.Show( "错误:" + ex.Message, "错误提示" , MessageBoxButtons.OKCancel, MessageBoxIcon.Error); return null ; } finally { if (OpenConn().State == ConnectionState.Open) { OpenConn().Close(); OpenConn().Dispose(); } } } #endregion |