redbb(....Dotneter....) @csdn.net

Teaching & Developing on NET ---- MS.net 为未来的十年做好了准备。您呢?
随笔 - 19, 文章 - 1, 评论 - 31, 引用 - 0
数据加载中……

最新评论

faint....我一年前就已经再用了。
我还记得用Shift + 滚轮是可以前进后退的。
faint....我一年前就已经再用了。
我还记得用Shift + 滚轮是可以前进后退的。
re: apply for a Article Column In Csdn .net
用正则表达式,怎么判断一字符串是不是日期格式?(C#)
/////////////////////////////////////////////////////////////////////////////////////////////////
采用该正则表达式
\b(20[0-5]{1}|199)[0-9]{1}[\-/]{1}([0]{0,1}[1-9]{1}|1(0|1|2))[\-/]{1}([0]{0,1}[1-9]{1}|[1-2]{1}[0-9]{1}|3[0-1]{1})\b
可以判断199×到205×之间的日期
用正则表达式,怎么判断一字符串是不是日期格式?(C#)
QQ:50910905
MSN:mingalwen@hotmail.com
re: apply for a Article Column In Csdn .net 笑红尘 2004-04-06 14:34  
看拉那篇C#中,用正则表达式分割字符串的文章,获益非浅.能具体请教些问题吗?
我的qq:17611776
msn:xiaohoch@hotmail.com(晚上在)
恭喜!
IE提供的功能, 按ctrl键+流动鼠标滑轮, 就可以改变字体大小!
首页没有合适的位置放置友情链接。
友情连接
re: 应该和博客堂互相作个建个连接 freedream 2004-02-02 08:20  
我觉得可行! dudu或博客园里的成员可以考虑跟博客堂做一个链接! 跟开心说说,估计他会同意的.
re: 应该和博客堂互相作个建个连接 WilliamXu 2004-02-01 22:15  
好象仅是友情连接的意思吧....
你的意思是不是你在博客堂发表的文章也可以显示在博客园?
The DiffGram is one of the two XML formats that you can use to render DataSet object contents to XML. The other format is the standard XML layout, which includes a root node that is named after the DataSet and that includes as child subtrees the names of the embedded tables. Each subtree represents one record in the given table. All this information is available through the DiffGram format, and much more, as well.

The key difference between the two XML formats lies in the ultimate goal for which they were designed. The ordinary XML serialization is mostly for persistence and local data storage, whereas the DiffGram format serves a slightly more ambitious purpose. The DiffGram is a format intended for network data exchange and .NET remoting.

You can persist a DataSet object with or without schema information, and the resultant XML file is a simple snapshot of the data being stored in the DataSet. In fact, only the current value of each row and column is persisted. Each row's state (added, modified, deleted) is lost, along with any error information associated with it.

The DiffGram format, however, includes also row state and row error information and considers both current and original values of each updated row. When you transmit a DiffGram over a network, or more simply across the boundaries of two distinct .NET processes, you serialize the representation of the DataSet object's living instance. From a DiffGram, you can rebuild a high-fidelity copy of the original DataSet with both error and row state information. By contrast, from the ordinary serialization XML format, you can build only a brand-new DataSet with fresh, unchanged, and error-free row information. Incidentally, the .NET Framework always serializes the DataSet object as a DiffGram when it has to travel across process or network boundaries. For example, a .NET Web Service's clients always get return DataSets as DiffGram XML strings.

A DiffGram is simply an XML string written according to a particular schema. It is in no way a .NET type. You create a DiffGram, or populate a DataSet from a DiffGram, by using the same methods you would use for the ordinary XML serialization of ADO.NET objects. These methods are WriteXml and ReadXml. The following code snippet shows how to serialize a DataSet object to a DiffGram:

StreamWriter sw = new StreamWriter(fileName);
ds.WriteXml(sw, XmlWriteMode.DiffGram);
sw.Close();
The resultant XML code is rooted in the <diffgr:diffgram> node and contains up to three distinct data sections, as follows:

<diffgr:diffgram>
<MyDataSet>
:
</MyDataSet>

<diffgr:before>
:
</diffgr:before>

<diffgr:errors>
:
</diffgr:errors>
</diffgr:diffgram>
The first section (MyDataSet, in the example above) is mandatory and represents the current instance of the data. The MyDataSet block is nearly identical to the ordinary XML serialization you can get. There are only a few differences, the greatest of which is that the DiffGram format never includes schema information. Another difference is that the DiffGram format doesn't support the Hidden column mapping type. When writing a table to XML, you can decide on a per-column basis how the value of that column has to be rendered. Values are normally rendered through a node element, but you can use attributes or, under special circumstances, simple text to change the representation. Another possible option is to hide the column completely from the XML representation. The XML serializer ignores such columns when you ask for an ordinary XML serialization, but columns are included when a DiffGram is prepared. However, these columns include a special annotation (that is, a node attribute) that states that they were originally marked as hidden.

The <diffgr:before> section includes the original values of the rows that have been modified or deleted since the DataSet's creation. The DataSet's current state is stored in the previously mentioned mandatory block. The difference between the rows' original and the current values--the DataSet's changes--is stored in the <diffgr:before> section. Only modified or deleted records are listed here. Newly added records are listed in only the data instance because they have no preceding reference to link to. The DiffGram format uses a unique ID to track the records in the two sections. Finally, the messages related to pending errors on rows are listed in the <diffgr:errors> sections.

You use the ReadXml method to load a DiffGram into a DataSet:

StreamReader sr = new StreamReader(fileName);
ds.ReadXml(sr, XmlReadMode.DiffGram);
sr.Close();
Note that for the loading to succeed, the DataSet must already have a compliant schema. All the necessary tables and columns have to exist already, even if they're empty. This requirement is a direct consequence of the lack of schema information in the DiffGram format.

Other platforms can also use the DiffGram format to send and receive information to a .NET Framework application. The DiffGram format is at the foundation of XML representation of data sets in .NET.
好文!
我对ADO.NET中的事务了解还不多,看来要好好研究。
我在MSDN中找了一些相关内容:
IsolationLevel.Serializable:在 DataSet 上放置范围锁,以防止在事务完成之前由其他用户更新行或向数据集中插入行。

EnforceConstraints:获取或设置一个值,该值指示在尝试执行任何更新操作时是否遵循约束规则。

为了维护数据的完整性,可以使用 Constraints 来对 DataTable 中的数据施加限制。约束是应用于某列或相关各列的自动规则,它决定了某行的值以某种方式更改时的操作过程。当 DataSet 的 EnforceConstraints 属性为 true 时,就可强制 Constraints。

ADO.NET 中有两种约束:ForeignKeyConstraint 和 UniqueConstraint。默认情况下,通过将 DataRelation 添加到 DataSet 来创建两个或多个表之间的关系时,两种约束都会自动创建。但是,也可以在创建关系时,通过指定 createConstraints = false 禁用这一行
我试了一下, 可以显示动态gif, 你再试试!
re: 2004.1 MVP 最新评选揭晓 coollzh 2004-01-30 17:28  
支持,共同努力
re: 2004.1 MVP 最新评选揭晓 Hover 2004-01-30 16:52  
Style: AnotherEon001
blog Style用的是最后那个!
试一下AnotherEon001
re: 2004.1 MVP 最新评选揭晓 Hover 2004-01-30 16:32  
下次,肯定有你了!努力!
严重同意dudu的意见
不如直接发表在博客园上,给大家一睹为快!
这篇文章还没有审批通过,请稍后……
(说明:推荐给《程序员》杂志的文章只有没被采用,或者已经在杂志上发表了,才会审批通过。)
现在还看不到哦!
re: MCAD &MCSD ect Exam 's Price redbb 2004-01-29 09:47  
the site should better provide to upload files, I can put it on , it 's english :)
re: MCAD &MCSD ect Exam 's Price dudu 2004-01-19 15:10  
哪儿有mcsd.net的教程?
re: Some Lowclass Error I meet ~~~ redbb 2004-01-18 20:35  
除了 DML 语言外, ExecuteNonQuery();
均返回-1
晕!都用英语哦!别光学习reddb 呵春节也学习哦!
有什么好的心得,学习方法、等分享
我们这些菜鸟 !
MSCD.NET考试多钱哦!
re: Some Lowclass Error I meet ~~~ dudu 2004-01-18 10:26  
Please more detail.
I study multithreading from
http://msdn.microsoft.com/msdnmag/issues/03/02/multithreading/default.aspx
It is a very good article.
Sorry,my English is poor!
I just study hard for MCSD.NET.
re: My first blog is open ! Hover 2004-01-16 10:12  
so have no time to update it everyday ;)
发些好文章,呵,