摘要: 1,首先导入命名空间:using System.Runtime.InteropServices;2,声明API函数 [DllImport("kernel32")] private static extern long WritePrivateProfileString(string section, string key, string val, string filePath);3,创建ini文件 WritePrivateProfileString("MyQQ", "ID", "541878994", @&quo 阅读全文
posted @ 2012-10-09 17:55 平凡人的程序人生 阅读(1006) 评论(0) 推荐(0) 编辑
摘要: 把写在.sql里面的语句取出(用读取文本文件的方法),构造成sql语句,1.用SqlCommand执行;2.将构造成的sql语句存入数据库表中,写触发器执行;取文本文件中的内容,可用System.IO.File 里面的方法if (File.Exists(FILE_NAME)) //如果文件存在 { String[] strs = System.IO.File.ReadAllLines(FILE_NAME); if (strs != null && strs.Length > 0) {... 阅读全文
posted @ 2012-10-09 16:26 平凡人的程序人生 阅读(1174) 评论(1) 推荐(0) 编辑