<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-17052973</id><updated>2011-04-21T13:58:34.576-07:00</updated><title type='text'>Brain.Serialize</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://engdump.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17052973/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://engdump.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Ming Chen</name><uri>http://www.blogger.com/profile/06719702460672499337</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>6</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-17052973.post-113258399973744300</id><published>2005-11-21T06:37:00.000-08:00</published><updated>2005-11-21T06:39:59.746-08:00</updated><title type='text'>Google  Book Search</title><content type='html'>Google has renamed its Google Print to &lt;a href="http://books.google.com/"&gt;Google Book Search&lt;/a&gt;.&lt;br /&gt; Finding the book you want has never been easier.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/17052973-113258399973744300?l=engdump.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://engdump.blogspot.com/feeds/113258399973744300/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17052973&amp;postID=113258399973744300' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17052973/posts/default/113258399973744300'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17052973/posts/default/113258399973744300'/><link rel='alternate' type='text/html' href='http://engdump.blogspot.com/2005/11/google-book-search.html' title='Google  Book Search'/><author><name>Ming Chen</name><uri>http://www.blogger.com/profile/06719702460672499337</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17052973.post-113209600215939886</id><published>2005-11-15T15:00:00.000-08:00</published><updated>2005-11-15T15:06:42.170-08:00</updated><title type='text'>The OLAP penalty for GUID primary keys</title><content type='html'>Guids are a nice choice for primary keys of relatively small databases. It avoids the problem of retrieving Identity value from database after each inserts. And because keys are universally unique, it's extremely useful for distributed databases.&lt;br /&gt;&lt;br /&gt;  However, Microsoft's SQL Server 2000 Analysis Service is not able to handle Guid keys. &lt;br /&gt;  See &lt;a href="http://support.microsoft.com/default.aspx?scid=KB;en-us;q241371"&gt;link to KB article.&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;  Although there is a work around (I.e. creating a view for these tables and convert Guids into varchars), this can become a major hassle and there is performance penalty. Think twice before you go with Guids if OLAP is down the list...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/17052973-113209600215939886?l=engdump.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://engdump.blogspot.com/feeds/113209600215939886/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17052973&amp;postID=113209600215939886' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17052973/posts/default/113209600215939886'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17052973/posts/default/113209600215939886'/><link rel='alternate' type='text/html' href='http://engdump.blogspot.com/2005/11/olap-penalty-for-guid-primary-keys.html' title='The OLAP penalty for GUID primary keys'/><author><name>Ming Chen</name><uri>http://www.blogger.com/profile/06719702460672499337</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17052973.post-113164639052154398</id><published>2005-11-10T08:18:00.000-08:00</published><updated>2005-11-18T08:25:36.583-08:00</updated><title type='text'>Get current DataRow from a DataSet that is bound to a DataGrid</title><content type='html'>Intuitively, one would use DataGrid.CurrentRowIndex to get the DataRow in the bound DataSet:&lt;br /&gt;&lt;pre style="color: rgb(51, 102, 255);"&gt;&lt;br /&gt;  dataset.Tables["MyTable"].Rows[datagrid.CurrentRowIndex];&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;This, however, won't work when the DataGrid is sorted. The correct way to get this done is through CurrencyManager (Or BindingManagerBase):&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt; DataViewRow current =&lt;br /&gt; (DataViewRow)datagrid.BindingContext[dataset, "MyTable"].Current;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt; DataRow row = current.Row;&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;The part of databinding that involves CurrencyManager is particularly confusing ---- aside from the name of the class itself ---- it seems there are more ways to pull a (different) CurrencyManager object out of BindingContext than to kill a cat:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;     datagrid.BindingContext[dataset];&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;     datagrid.BindingContext[dataset, "MyTable"];&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;     datagrid.BindingContext[dataset, "MyTable.MyTableRelation"];&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;     datagrid.BindingContext[dataset, "MyTableRelation"];&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;     //...&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/17052973-113164639052154398?l=engdump.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://engdump.blogspot.com/feeds/113164639052154398/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17052973&amp;postID=113164639052154398' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17052973/posts/default/113164639052154398'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17052973/posts/default/113164639052154398'/><link rel='alternate' type='text/html' href='http://engdump.blogspot.com/2005/11/get-current-datarow-from-dataset-that.html' title='Get current DataRow from a DataSet that is bound to a DataGrid'/><author><name>Ming Chen</name><uri>http://www.blogger.com/profile/06719702460672499337</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17052973.post-113146890671780823</id><published>2005-11-08T08:04:00.000-08:00</published><updated>2005-11-08T08:55:06.730-08:00</updated><title type='text'>Auditing Triggers and Typed DataSets</title><content type='html'>A simple way to leave an audit trace in the database is to add &lt;span style="font-weight: bold;"&gt;LastUpdateUser&lt;/span&gt; and &lt;span style="font-weight: bold;"&gt;LastUpdateTime&lt;/span&gt; columns in each DB table, and then use Triggers to update them for each insert and update operation. (However, datetime is NOT a good candidate for &lt;span style="font-style: italic;"&gt;Optimistic Concurrency Management, &lt;/span&gt;Because it's only &lt;a href="http://msdn.microsoft.com/sql/default.aspx?pull=/library/en-us/dnsqlpro04/html/sp04e9.asp"&gt;accurate to 3.33ms&lt;/a&gt;, which still leaves room for concurrency issues)&lt;br /&gt;&lt;br /&gt;  But when combined with Typed DataSet, this gives a little bit of headache: every table now has these columns that are basically readonly. The function signature for adding a row in the table now becomes something like:&lt;br /&gt;&lt;br /&gt; &lt;span style="color: rgb(51, 102, 255);"&gt;    &lt;/span&gt;&lt;span style="color: rgb(51, 102, 255);font-size:85%;" &gt;&lt;span style="font-family: courier new;"&gt;CustomerDataSet.AddCustomer(string FirstName, string LastName, string LastUpdateUser, DateTime LastUpdateTime);&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;   Which is very confusing. I have tried msdata:ReadOnly in xsd, but it doesn't work. And you can't pass nulls for these parameters as it will generate an exception.&lt;br /&gt;&lt;br /&gt;   One way to get around this is to use the AddCustomer(CustomerRow row) interface, but that involves several more lines of code than the above function call.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/17052973-113146890671780823?l=engdump.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://engdump.blogspot.com/feeds/113146890671780823/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17052973&amp;postID=113146890671780823' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17052973/posts/default/113146890671780823'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17052973/posts/default/113146890671780823'/><link rel='alternate' type='text/html' href='http://engdump.blogspot.com/2005/11/auditing-triggers-and-typed-datasets.html' title='Auditing Triggers and Typed DataSets'/><author><name>Ming Chen</name><uri>http://www.blogger.com/profile/06719702460672499337</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17052973.post-113114766140527869</id><published>2005-11-04T15:38:00.000-08:00</published><updated>2005-11-04T15:42:27.140-08:00</updated><title type='text'>Nested/Recursive Triggers</title><content type='html'>In SQL Server, Triggers cascade by default. That is, if you do an update in insert AFTER TRIGGER, this will invoke the update TRIGGER.&lt;br /&gt;&lt;br /&gt;However, Triggers don't recursive by default. Doing Update in an Update Trigger won't lead you into an infinite loop.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/createdb/cm_8_des_08_0lo3.asp"&gt;Link to MSDN&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/17052973-113114766140527869?l=engdump.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://engdump.blogspot.com/feeds/113114766140527869/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17052973&amp;postID=113114766140527869' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17052973/posts/default/113114766140527869'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17052973/posts/default/113114766140527869'/><link rel='alternate' type='text/html' href='http://engdump.blogspot.com/2005/11/nestedrecursive-triggers.html' title='Nested/Recursive Triggers'/><author><name>Ming Chen</name><uri>http://www.blogger.com/profile/06719702460672499337</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17052973.post-113114751783085395</id><published>2005-11-03T15:38:00.000-08:00</published><updated>2005-11-10T10:39:00.986-08:00</updated><title type='text'>Moving In...</title><content type='html'>Having deserted my &lt;a href="http://blog.joycode.com/qqchen"&gt;old (Chinese) blog&lt;/a&gt; for more than a year, I finally put myself togather to start blogging all over again.&lt;br /&gt;&lt;br /&gt;Welcome to my new dumping ground for technical articles,  study notes, (hopefully) brilliant ideas and absolute nonsenses...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/17052973-113114751783085395?l=engdump.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://engdump.blogspot.com/feeds/113114751783085395/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17052973&amp;postID=113114751783085395' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17052973/posts/default/113114751783085395'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17052973/posts/default/113114751783085395'/><link rel='alternate' type='text/html' href='http://engdump.blogspot.com/2005/11/moving-in.html' title='Moving In...'/><author><name>Ming Chen</name><uri>http://www.blogger.com/profile/06719702460672499337</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>
