-
C# 建立SQL Server数据库连接的基本方法
C# 建立SQL Server数据库连接的基本方法,核心代码为:
try
{
string ConStr =//创建数据库连接字符串
@"server=WIN-GI7E47AND9RLS;user id=sa;pwd=;database=db_TomeTwo";
SqlConnection con = new SqlConnection(ConStr);//创建数据库连接对象
string SqlStr = "select * from 帐单";//创建SQL查询字符串
SqlDataAdapter ada = new SqlDataAdapter(SqlStr, con);//创建数据适配器对象
DataSet ds = new DataSet();//创建数据表
ada.Fill(ds);//填充数据集
this.dgv_Message.DataSource =//设置数据源
ds.Tables[0].DefaultView;
}
catch(Exception ex)//捕获异常
{
MessageBox.Show(ex.Message,"提示!");//弹出消息对话框
}
- 2022-07-28 04:06:36下载
- 积分:1
-
WPF加载Obj三维模型
通过WPF加载Obj模型。内含源码,执行程序等相关文件。(Load the Obj model through WPF. Include source code, execution program and other related documents.)
- 2018-06-11 20:26:22下载
- 积分:1
-
sd_music
读SD卡用SST单片机与tlc5620播放音乐程序(Read SD card with SST SCM and play music tlc5620 procedures)
- 2009-03-17 11:52:05下载
- 积分:1
-
车辆管理系统
车辆管理系统,实现基本的 车辆的增加删除修改,人员的增加删除修改,界面美观,适合初学者参考使用
- 2022-03-22 05:32:16下载
- 积分:1
-
cpplibraryfunctionmanual
里面包含了linux和c++库函数使用手册,希望对学习c++的人有帮助(Which contains linux and c++ library function manual, and I hope people learn c++ help)
- 2011-01-08 12:33:10下载
- 积分:1
-
hubgear_standard
提供hubgear的应用实例,可以更改齿轮数达到不同的效果。(The application of the provision of hubgear, you can change gear reached different results.)
- 2008-04-09 22:12:33下载
- 积分:1
-
摇摇棒(基于51单片机)
摇摇棒工程文件,基于Altium designer ,详细原理图及PCB,也包含工厂输出文件,可以直接投板
- 2019-05-05下载
- 积分:1
-
C#操作ACESSS数据库,是我的第一个作品,现在看来有点究了,但是学习是可以的,...
C#操作ACESSS数据库,是我的第一个作品,现在看来有点究了,但是学习是可以的,-C# operation ACESSS database, I was the first one works, it now appears a little study, but the study is, huh
- 2022-07-24 15:14:42下载
- 积分:1
-
PC-LINT
代码检查的PC-lint工具源码,实现在Windows上图形化检测代码是否符合规范。(the source code of PC-lint on windows)
- 2014-09-02 22:56:45下载
- 积分:1
-
HOSPITOL
住院管理系统的VC++&SQL原型。混合编程系列作品。里面包含数据库建立文件和所有源码。(A hospitol manegement systerm based on VC++and SQL.)
- 2009-10-17 15:36:37下载
- 积分:1