4、把程序常用的,在program里面和glob里面加载。2019年6月25日
3、ADO.NET SQL语句 string sqlInsert = " insert into Result( bjbh , j ycs "
+ " , M100 " //烟度100%点实测值
+ " , M100XZ " //烟度100%点实测限值
+ " ) values ( ' " + bjbh + " ' , ' " +jycs+ " ' "
+ ",' "+model.100k+" ' "
+ ",' "+model.100kLimit+" ' ) " ;
按以前那样写插入语句容易把值对应错,或者是数量对应不对,这样写可以在sql语句中添加表列的注释,使代码清晰,写出来的表列和对应的values值一目了然,而且可以直接复制粘贴表中的列直接写到sql语句上。2019年6月13日
2、ADO.NET SQL语句 循环多次向数据库插入数据的时候,不要每次都连接数据库插入1次,最好是用事务把所有插入的语句,写到一个sqlList里面,最后只连接一次数据库插入,这样可以减轻数据库服务器的压力,不用每次插入都连接一下服务器。2019年6月13日
1、Devexperss报表组织数据的时候,如果不用存储过程在数据库中组织数据,用sql语句在后台组织数据的时候,尽量查出来的DataTable不要污染,别人可以复用,可以把DataTable里面的用DataRow["字段名"]在按照需要表现数据的形式在重新组织数据,例如数据库查出DataRow["检测方法"]="W1" ,可以改成DataRow["检测方法"]="稳态工况法"。2019年5月14日