万能吗?
来源:互联网 发布:环境专业数据网站 编辑:程序博客网 时间:2024/06/11 15:14
class SQLHelper
{
static string p = Path.GetDirectoryName(Assembly.GetExecutingAssembly().GetName().CodeBase);
public static int ExcuteSQL(string sql, string load)
{
string ConStr = "Data Source=" + p + load;
SqlCeConnection conn = new SqlCeConnection(ConStr);
int count = 0;
try
{
conn.Open();
SqlCeCommand cmd = new SqlCeCommand(sql, conn);
count = cmd.ExecuteNonQuery();
cmd.Dispose();
}
catch (Exception ee)
{
MessageBox.Show(ee.Message);
}
finally
{
conn.Close();
}
return count;
}//增删改
public static DataTable GetTable(string sql, string load)
{
string ConStr = "Data Source=" + p + load;
SqlCeConnection conn = new SqlCeConnection(ConStr);
DataTable dt = new DataTable();
try
{
SqlCeDataAdapter sda = new SqlCeDataAdapter(sql, conn);
sda.Fill(dt);
}
catch (Exception ee)
{
MessageBox.Show(ee.Message);
}
return dt;
}//查
求教!!!!!!!!!!!
这段代码可以万能使用吗?
这个是移动开发平台的!!!!!!
- 万能吗?
- 税是万能的吗?
- 金钱是万能的吗
- 有万能PDF格式转换器吗
- 真有万能通用的OA办公系统吗
- 论上帝是万能的吗之我见
- 万能辞职报告
- 万能讲话稿
- 万能makefile
- 万能Makefile
- 万能Makefile
- 万能makefile
- 万能过滤器
- 万能指针
- 万能makefile
- 万能Makefile
- 万能密码
- 万能Makefile
- Android 菜单设计例子
- 女人的正确生活方式
- 大二伊始
- Linq to Sql 如何实现 in 与 not in
- 空菱形????
- 万能吗?
- 关于窗口最大化
- hibernate实体表示法之DOM4J表示法(1)
- 一位程序员兄弟的自白
- 如何将一个url的返回值写入到文件中
- SVN的子命令SVN diff功能介绍
- Quantumas 展现的高级渲染技术
- Java从入门到精通 - Swing高级JInternalFrameTest内部窗体
- Streaming media protocols