總網頁瀏覽量

關於我自己

我的相片
人生的必修課是接受無常,人生的選修課是放下執著。

2015年10月16日 星期五

HTML格式化code

------------------------------在HTML撰寫------------------------------
<link href="http://alexgorbatchev.com/pub/sh/2.0.320/styles/shCore.css" rel="stylesheet" type="text/css"></link><br />
<link href="http://alexgorbatchev.com/pub/sh/2.0.320/styles/shThemeDefault.css" id="shTheme" rel="stylesheet" type="text/css"></link><br />
<script src="http://alexgorbatchev.com/pub/sh/2.0.320/scripts/shCore.js" type="text/javascript">
</script><br />
<script src="http://alexgorbatchev.com/pub/sh/2.0.320/scripts/shLegacy.js" type="text/javascript">
</script><br />
<script src="http://alexgorbatchev.com/pub/sh/2.0.320/scripts/shBrushJava.js" type="text/javascript">
</script><br />
<script type="text/javascript">
SyntaxHighlighter.config.bloggerMode = true;
SyntaxHighlighter.ClipboardSwf = 'http://http://alexgorbatchev.com/pub/sh/2.0.320/scripts/clipboard.swf';
SyntaxHighlighter.all();
</script><br />
<div style="color: black;">
<pre class="brush: java">
String strSQL = " INSERT INTO TABLENAME (SCHEMA, SCHEMA, SCHEMA) VALUES (VALUES, VALUES, VALUES) ";
SqlConnection sqlConn = new System.Data.SqlClient.SqlConnection("Data Source=IP;User Id=ID; Password=PASSWORD; Initial Catalog=DBNAME");
sqlConn.Open();
SqlCommand sqlcommand = new SqlCommand(strSQL, sqlConn);
sqlcommand.ExecuteNonQuery();
sqlConn.Close();

</pre>
<br />
<br />
<br />
<br /></div>

------------------------------呈現如下效果------------------------------
1String strSQL = " INSERT INTO TABLENAME (SCHEMA, SCHEMA, SCHEMA) VALUES (VALUES, VALUES, VALUES) ";
2SqlConnection sqlConn = new System.Data.SqlClient.SqlConnection("Data Source=IP;User Id=ID; Password=PASSWORD; Initial Catalog=DBNAME");
3sqlConn.Open();
4SqlCommand sqlcommand = new SqlCommand(strSQL, sqlConn);
5sqlcommand.ExecuteNonQuery();
6sqlConn.Close();

沒有留言:

張貼留言