CYQ.Data componentsCYQ.Data support multi-database application [Txt,Xml,Access, MSSQL, Oracle,SQLite,MySql], help easily and quickly to develop your project |
CYQ.Data V4.5.5 版本发布
Platform for dynamic |
|
|
| #TopicOwner |
前言: 继上一版本:CYQ.Data 数据框架 版本发布 V4.5,刷的一下又三个多月了, 进一步的说,从 CYQ.Data V4.5的发布到现在,是半年多了,今天,终于得发布新小版本了。 由于上一版本过于稳定,导致此版本无bug修正项,但是新增了几个重要的性能优化功能。 本版本新增加的功能预览 1:优化Access、SQLite数据库链接,以{0}代表根目录 好处:可以配置多个数据库链接,示例如:秋色园QBlog同时用了N个access数据库。 2:MAction增加指定列的查询功能:SetSelectColumns 好处:查询时可以指定列名,减少传输量。 3:增加AppDebug类,可以全局输出执行过的SQL语句 好处:随时掌控并打印页面SQL,直接分析和优化SQL语句。 4:增加FastToT的Emit类,提升大数据量时从MDataTable转List<T>的性能 好处:在返回数据量较大转实体时,可以利用Emit加快速度,提升性能。 5:关闭默认mssql/oracle的事务开启 好处:事务有需要就打开,默认不打开。 如需要兼容V4.5及以前版本的事务,可使用配置项兼容:<add key="TransationDefaultOpen" value="true"> </add> 6:XmlHelper更名为XHtmlAction 其它:增加的配置项: OpenDebugInfo:true/false,是否开启调试SQL语句记录,开发时打开,运行时可关闭。 RecordSqlLongQueryTime:N(单位毫秒),运行时设置,记录执行时间长的SQL语句,可以针对性分析与优化。 AppDebugFilterTime:N(单位毫秒),AppDebug可以输出页面SQL,通过此项可以过滤。 下面进行详细的解说 1:优化Access、SQLite数据库链接,以{0}代表根目录 示例: <connectionStrings>
<add name="Conn" connectionString="Data Source={0}App_Data\qblog.db;failifmissing=false" providerName="System.Data.SQLite" /> </connectionStrings> 2:MAction增加指定列的查询功能:SetSelectColumns 示例:[包含:查询,分页,绑定] protected void BindData()
{ int count; using (MAction action = new MAction(TableNames.Blog_Class)) { action.SetSelectColumns(selectColumns);//指定列 action.Select(Pager1.PageIndex, Pager1.PageSize, string.Empty, out count).Bind(gvClass); Pager1.Count = count; Pager1.BindName = "BindData"; } } 3:增加AppDebug类,可以全局输出执行过的SQL语句 示例:[在页面基类里,轻松处理一下即可] public class PageBase:System.Web.UI.Page
{ protected override void OnInit(EventArgs e) { AppDebug.Start();//开启记录页面的SQL base.OnInit(e); } protected override void OnPreRenderComplete(EventArgs e) { base.OnPreRenderComplete(e); Response.Write(AppDebug.Info);//输出记录页面的SQL AppDebug.Stop();//停止记录页面的SQL } } 页面效果:
其它几点的示例,写成了示例项目: 示例解决方案: 完整的示例页面: 最后: CYQ.Data 数据框架主页:http://www.cyqdata.com/cyqdata CYQ.Data 数据框架下载(包括示例):http://www.cyqdata.com/download/article-detail-426
|
游客[注册][222.72.46.*]2012/9/20 6:32:07 | #10 | |
希望在之后的版本中,做一个修改: SQLString.formatWhere 判断Where是否包含"like","between","in"时,在这3个逻辑判断符号的字符串前后加上空格。像我这样习惯用字符串当主键(非id int类主键)的会有帮助。如果传入一个包含3个符号的字符串的主键作为WHERE参数,就会出错。譬如刚insert一条记录,主键包含"in"就没法完成最后MDataTable填充的Select操作,造成insert报错。 reply: 感谢您的建议,后续版本会增加如此处理。 |
游客[注册][58.251.86.*]2011/12/25 1:16:23 | #9 | |
请问是否可以同时支持多个数据库?比如多个版本的sqlserver,或者同时支持sqlserver 和oracle? reply: 可以! |
游客[注册][1.193.70.*]2011/12/23 9:30:16 | #8 | |
能否用在winform中? reply: 可以。 |
swhhcf2011/10/11 21:45:48 | #6 | |
谢谢解答,还有一个建议:是否能添加一个功能GetFromDataTabe:类似于GefFromJson 主要是基于从Excel导入时通常导入为DataTable |
游客[注册][218.107.16.*]2011/10/4 0:11:37 | #5 | |
楼上说得找不到表。不是Bug。 是4.5新修改的地方,{0}代表根目录,可以看看修改日志,那里有例子! ~~~今天我也出了这个问题,搞了半天才发现原来是新版本修改了这个配置! |
swhhcf[218.75.89.*]2011/9/13 21:53:52 | #4 | |
报告一个bug: 我用4.5的时候, string sql = "select username from smteacherinfo"; MProc proc = new MProc(sql); MDataTable dt=proc.ExeMDataTable(); 上述代码一切正常,改成4.5.5时,上述代码在运行到第3行时出错,说表smteacherinfo可能不存在 |
Post Comment
Bulletin
Article Search
Categories
- Platform for dynamic (20)
- Feedback (9)
- Guide (33)
- Principles (19)
- Project-Case (8)
- Business & Buy (2)
- Technology exchange (45)
New Article
- CYQ.Data Components Getting Started Guide [Part 5]-[MProc Execute Stored Procedures or SQL]
- CYQ.Data Components Getting Started Guide [Part 4]-[MAction Insert Delete Update]
- CYQ.Data Components Getting Started Guide [Part 3]-[MAction Get And Set Value]
- CYQ.Data Components Getting Started Guide [Part 2]-[MAction Data Query- Fill And Select]
- CYQ.Data Components Getting Started Guide [Part 1]
New Comment
- When some one searches for his necessary thing, therefore he/she wishes to be available that in detail, so that thing is maintained over here.
- This is my first time pay a quick visit at here and i am in fact happy to read everthing at alone place.
- I truly appreciate this blog article.Really thank you! Cool.
- please pay a visit to the web sites we follow, like this one particular, as it represents our picks in the web
- Really enjoyed this post.Really thank you!
- Really enjoyed this article.Really looking forward to read more. Great.
- poker bonuses What are the norms of copyright of web content? How as it different from Patent?
- Wow! Thank you! I permanently needed to write on my blog something like that. Can I implement a fragment of your post to my site?
- This website was how do I say it? Relevant!! Finally I ave found something that helped me. Cheers!
- I was reading through some of your content on this internet site and I believe this web site is very informative ! Continue posting.