自强不息,止于至善

身无半文,心忧天下;手释万卷,神交古人
  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

2007年10月21日

摘要: //sql语句批处理 string select = "SELECT COUNT(*) FROM Customers; SELECT COUNT(*) FROM Products"; using (SqlConnection conn = new SqlConnection(source)) { conn.Open(); SqlCommand cmd = new S... 阅读全文

posted @ 2007-10-21 09:34 L.Zhang 阅读(104) 评论(0) 推荐(0)

2007年10月16日

摘要: using System; using System.Data; using System.Data.SqlClient; SqlConnection myConnection = new SqlConnection("Data Source=localhost;Initial Catalog=Northwind;Integrated Security=SSPI;"); myConnectio... 阅读全文

posted @ 2007-10-16 15:03 L.Zhang 阅读(127) 评论(0) 推荐(0)

摘要: using Microsoft.Win32; //写入 RegistryKey softwareKey = Registry.LocalMachine.OpenSubKey("Software", true); RegistryKey myKey = softwareKey.CreateSubKey("myKey"); myKey.SetValue("key1", (object)"value... 阅读全文

posted @ 2007-10-16 14:58 L.Zhang 阅读(140) 评论(0) 推荐(0)

摘要: using System.IO; using System.Runtime.Serialization.Formatters.Binary; using System.Runtime.Serialization.Formatters.Soap; using System.Xml.Serialization; // 序列化为二进制 FileStream fileStream = new FileS... 阅读全文

posted @ 2007-10-16 14:56 L.Zhang 阅读(135) 评论(0) 推荐(0)