<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: How do I bind to ADO.NET?</title>
	<atom:link href="http://bea.stollnitz.com/blog/?feed=rss2&#038;p=21" rel="self" type="application/rss+xml" />
	<link>http://bea.stollnitz.com/blog/?p=21</link>
	<description>on Silverlight and WPF</description>
	<lastBuildDate>Thu, 22 Jul 2010 20:56:04 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Bea</title>
		<link>http://bea.stollnitz.com/blog/?p=21&#038;cpage=1#comment-387</link>
		<dc:creator>Bea</dc:creator>
		<pubDate>Wed, 19 Sep 2007 23:53:15 +0000</pubDate>
		<guid isPermaLink="false">http://bea.stollnitz.com/blog/?p=21#comment-387</guid>
		<description>Hi Reiner,

My guess is that you should not be able to connect directly to a SQL server from a partial trust application, for security reasons. I am not an expert in partial trust apps or WCF, so it&#039;s hard for me to guide you. Maybe someone reading this post will have better insight.

Bea</description>
		<content:encoded><![CDATA[<p>Hi Reiner,</p>
<p>My guess is that you should not be able to connect directly to a SQL server from a partial trust application, for security reasons. I am not an expert in partial trust apps or WCF, so it&#8217;s hard for me to guide you. Maybe someone reading this post will have better insight.</p>
<p>Bea</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Bea</title>
		<link>http://bea.stollnitz.com/blog/?p=21&#038;cpage=1#comment-351</link>
		<dc:creator>Bea</dc:creator>
		<pubDate>Tue, 18 Sep 2007 02:34:20 +0000</pubDate>
		<guid isPermaLink="false">http://bea.stollnitz.com/blog/?p=21#comment-351</guid>
		<description>Hi,

Well, I know the internals of binding because I&#039;ve worked for the WPF Data Binding team for several years. I helped create this API.
If you&#039;re interested in learning about the internals of binding (or any managed technology) I recommend &lt;a href=&quot;http://www.aisto.com/roeder/dotnet/&quot; rel=&quot;nofollow&quot;&gt;Dot Net Reflector&lt;/a&gt; from Lutz Roeder. In his own words, here&#039;s what this tool does:

&quot;Reflector is the class browser, explorer, analyzer and documentation viewer for .NET. Reflector allows to easily view, navigate, search, decompile and analyze .NET assemblies in C#, Visual Basic and IL.&quot;

I find myself using this tool every time I need to write code. 

And of course, reading blogs and asking questions is a great way to learn any technology.

I hope you&#039;re making progress with WPF!

Bea</description>
		<content:encoded><![CDATA[<p>Hi,</p>
<p>Well, I know the internals of binding because I&#8217;ve worked for the WPF Data Binding team for several years. I helped create this API.<br />
If you&#8217;re interested in learning about the internals of binding (or any managed technology) I recommend <a href="http://www.aisto.com/roeder/dotnet/" rel="nofollow">Dot Net Reflector</a> from Lutz Roeder. In his own words, here&#8217;s what this tool does:</p>
<p>&#8220;Reflector is the class browser, explorer, analyzer and documentation viewer for .NET. Reflector allows to easily view, navigate, search, decompile and analyze .NET assemblies in C#, Visual Basic and IL.&#8221;</p>
<p>I find myself using this tool every time I need to write code. </p>
<p>And of course, reading blogs and asking questions is a great way to learn any technology.</p>
<p>I hope you&#8217;re making progress with WPF!</p>
<p>Bea</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Reiner</title>
		<link>http://bea.stollnitz.com/blog/?p=21&#038;cpage=1#comment-206</link>
		<dc:creator>Reiner</dc:creator>
		<pubDate>Wed, 23 May 2007 10:06:29 +0000</pubDate>
		<guid isPermaLink="false">http://bea.stollnitz.com/blog/?p=21#comment-206</guid>
		<description>Hi:

I am new in XAML and WPF. I am trying to use a SQL-SERVER connection in a XBAP I can do it inside a WPF Windows application, but when I try to do the same like Load_Page() ASP.NET I get an error 





void mainPage_Loaded(object sender, RoutedEventArgs e)

{

// Connection Fail 

}





I have download many good books like:

Applications = Code + Markup: A Guide to the Microsoft® Windows® Presentation Foundation

By Charles Petzold




Programming WCF Services

By Juval Lowy




But no body speak about access data from SQL-SERVER database

may be you can help me.



Excuse my English I speak Spanish .



Thank you

Reiner 

reinerra@hotmail.com</description>
		<content:encoded><![CDATA[<p>Hi:</p>
<p>I am new in XAML and WPF. I am trying to use a SQL-SERVER connection in a XBAP I can do it inside a WPF Windows application, but when I try to do the same like Load_Page() ASP.NET I get an error </p>
<p>void mainPage_Loaded(object sender, RoutedEventArgs e)</p>
<p>{</p>
<p>// Connection Fail </p>
<p>}</p>
<p>I have download many good books like:</p>
<p>Applications = Code + Markup: A Guide to the Microsoft® Windows® Presentation Foundation</p>
<p>By Charles Petzold</p>
<p>Programming WCF Services</p>
<p>By Juval Lowy</p>
<p>But no body speak about access data from SQL-SERVER database</p>
<p>may be you can help me.</p>
<p>Excuse my English I speak Spanish .</p>
<p>Thank you</p>
<p>Reiner </p>
<p><a href="mailto:reinerra@hotmail.com">reinerra@hotmail.com</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Bea</title>
		<link>http://bea.stollnitz.com/blog/?p=21&#038;cpage=1#comment-205</link>
		<dc:creator>Bea</dc:creator>
		<pubDate>Mon, 04 Sep 2006 15:09:44 +0000</pubDate>
		<guid isPermaLink="false">http://bea.stollnitz.com/blog/?p=21#comment-205</guid>
		<description>Hi Mike,

I&#039;m assuming you would like to display that hierarchy in a TreeView, right? I&#039;m also assuming the data on the first level of the TreeView is stored in a table in a database, and the second level is stored on some other table.

If that&#039;s the case, I would build a middle data layer that reads the information from the database and creates a hierarchical data structure in the format you want. Then you can bind your TreeView directly to that data structure.

The ideal data structure for this scenario would be a collection of MyMountain objects. MyMountain would contain an int MountainID property and a ObservableCollection&lt;MyLift&gt; Lifts property. MyLift would simply contain a string property with the lift name. Once you have this structure, you can use HierarchicalDataTemplates to help the TreeView display the data.

Let me know if this helps.
Bea</description>
		<content:encoded><![CDATA[<p>Hi Mike,</p>
<p>I&#8217;m assuming you would like to display that hierarchy in a TreeView, right? I&#8217;m also assuming the data on the first level of the TreeView is stored in a table in a database, and the second level is stored on some other table.</p>
<p>If that&#8217;s the case, I would build a middle data layer that reads the information from the database and creates a hierarchical data structure in the format you want. Then you can bind your TreeView directly to that data structure.</p>
<p>The ideal data structure for this scenario would be a collection of MyMountain objects. MyMountain would contain an int MountainID property and a ObservableCollection<mylift> Lifts property. MyLift would simply contain a string property with the lift name. Once you have this structure, you can use HierarchicalDataTemplates to help the TreeView display the data.</p>
<p>Let me know if this helps.<br />
Bea</mylift></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mike</title>
		<link>http://bea.stollnitz.com/blog/?p=21&#038;cpage=1#comment-204</link>
		<dc:creator>Mike</dc:creator>
		<pubDate>Sun, 03 Sep 2006 19:41:10 +0000</pubDate>
		<guid isPermaLink="false">http://bea.stollnitz.com/blog/?p=21#comment-204</guid>
		<description>Sorry, that output didn&#039;t format as I expected. Basically, the numbers are the tree item parent headers (Mountain_ID) and the lift names are the child items.

Thanks for the help,
Mike</description>
		<content:encoded><![CDATA[<p>Sorry, that output didn&#8217;t format as I expected. Basically, the numbers are the tree item parent headers (Mountain_ID) and the lift names are the child items.</p>
<p>Thanks for the help,<br />
Mike</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mike</title>
		<link>http://bea.stollnitz.com/blog/?p=21&#038;cpage=1#comment-203</link>
		<dc:creator>Mike</dc:creator>
		<pubDate>Sun, 03 Sep 2006 18:10:24 +0000</pubDate>
		<guid isPermaLink="false">http://bea.stollnitz.com/blog/?p=21#comment-203</guid>
		<description>Hi Bea,

Thanks for your tips. I find data binding extremely hard to understand, so seeing your examples if very nice. I feel kind of silly asking this question because it seems like it should be very simple, but I can&#039;t seem to get it right.

If I want to build a tree hierarchy from the Lifts table where Mountain_ID designates the parent node and Lift_Name is the child, then how would I do that?

The output would look like this:

1
Big Red Express
Garbanzo Express
Orange chair
2 
Tye Mill
Jupiter chair
Southern cross chair
3
Rainier Express
Green Valley</description>
		<content:encoded><![CDATA[<p>Hi Bea,</p>
<p>Thanks for your tips. I find data binding extremely hard to understand, so seeing your examples if very nice. I feel kind of silly asking this question because it seems like it should be very simple, but I can&#8217;t seem to get it right.</p>
<p>If I want to build a tree hierarchy from the Lifts table where Mountain_ID designates the parent node and Lift_Name is the child, then how would I do that?</p>
<p>The output would look like this:</p>
<p>1<br />
Big Red Express<br />
Garbanzo Express<br />
Orange chair<br />
2<br />
Tye Mill<br />
Jupiter chair<br />
Southern cross chair<br />
3<br />
Rainier Express<br />
Green Valley</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Bea</title>
		<link>http://bea.stollnitz.com/blog/?p=21&#038;cpage=1#comment-202</link>
		<dc:creator>Bea</dc:creator>
		<pubDate>Sun, 27 Aug 2006 03:32:33 +0000</pubDate>
		<guid isPermaLink="false">http://bea.stollnitz.com/blog/?p=21#comment-202</guid>
		<description>Sam,
Glad you got it to work :) 
Bea</description>
		<content:encoded><![CDATA[<p>Sam,<br />
Glad you got it to work :)<br />
Bea</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Bea</title>
		<link>http://bea.stollnitz.com/blog/?p=21&#038;cpage=1#comment-201</link>
		<dc:creator>Bea</dc:creator>
		<pubDate>Sat, 26 Aug 2006 14:53:14 +0000</pubDate>
		<guid isPermaLink="false">http://bea.stollnitz.com/blog/?p=21#comment-201</guid>
		<description>Hi,

Regarding your question on change notifications and ADO. You should not need to do anything special to notify WPF of changes in the DataTable. It&#039;s strange that you&#039;re seeing something different in your application.

I made a simple sample that shows how adding an item to a DataTable gets reflected automatically in the UI. You can find it &lt;a href=&quot;http://www.beacosta.com/BlogComments/17AddItemADO.zip&quot; rel=&quot;nofollow&quot;&gt;here&lt;/a&gt;.

Hopefully this will help you find the problem in your app.

Thanks!
Bea</description>
		<content:encoded><![CDATA[<p>Hi,</p>
<p>Regarding your question on change notifications and ADO. You should not need to do anything special to notify WPF of changes in the DataTable. It&#8217;s strange that you&#8217;re seeing something different in your application.</p>
<p>I made a simple sample that shows how adding an item to a DataTable gets reflected automatically in the UI. You can find it <a href="http://www.beacosta.com/BlogComments/17AddItemADO.zip" rel="nofollow">here</a>.</p>
<p>Hopefully this will help you find the problem in your app.</p>
<p>Thanks!<br />
Bea</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Anonymous</title>
		<link>http://bea.stollnitz.com/blog/?p=21&#038;cpage=1#comment-200</link>
		<dc:creator>Anonymous</dc:creator>
		<pubDate>Fri, 25 Aug 2006 18:06:58 +0000</pubDate>
		<guid isPermaLink="false">http://bea.stollnitz.com/blog/?p=21#comment-200</guid>
		<description>Hi,

Thank you for providing very good posts on data binding. It has helped me a lot in getting started. 
To understand this topic further I&#039;m using Northwind Database and trying to populate a ListView with Employee data. Now I have a Dataset with table &quot;EmployeeData&quot; which has EmployeeID, FirstName and LastName. I&#039;m binding the ListView with Dataset&#039;s table EmployeeData (I&#039;m also using data templates for displaying the data) and the page works fine. My question is If I add a record to the Northwind.Employee table, how can that get updated in the UI. I tried using the INotifyPropertyChanged interface but an not sure on what property should I implement onPropertyChanged event. I tried on the Dataset and that did not work. Every sample that I see on the internet does databinding on simple datatypes. Is it possible to do two way binding on objects.</description>
		<content:encoded><![CDATA[<p>Hi,</p>
<p>Thank you for providing very good posts on data binding. It has helped me a lot in getting started.<br />
To understand this topic further I&#8217;m using Northwind Database and trying to populate a ListView with Employee data. Now I have a Dataset with table &#8220;EmployeeData&#8221; which has EmployeeID, FirstName and LastName. I&#8217;m binding the ListView with Dataset&#8217;s table EmployeeData (I&#8217;m also using data templates for displaying the data) and the page works fine. My question is If I add a record to the Northwind.Employee table, how can that get updated in the UI. I tried using the INotifyPropertyChanged interface but an not sure on what property should I implement onPropertyChanged event. I tried on the Dataset and that did not work. Every sample that I see on the internet does databinding on simple datatypes. Is it possible to do two way binding on objects.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: sam</title>
		<link>http://bea.stollnitz.com/blog/?p=21&#038;cpage=1#comment-199</link>
		<dc:creator>sam</dc:creator>
		<pubDate>Sun, 20 Aug 2006 10:25:02 +0000</pubDate>
		<guid isPermaLink="false">http://bea.stollnitz.com/blog/?p=21#comment-199</guid>
		<description>Uhm, stupid me, I didn&#039;t see the binding error message in the debugger output window:

System.Windows.Data Error: 12 : Cannot get &#039;Nr&#039; value (type &#039;String&#039;) from &#039;&#039; (type &#039;DataRowViewWrapper&#039;). BindingExpression:Path=Nr; DataItem=&#039;DataRowViewWrapper&#039; (HashCode=65429669); target element is &#039;TextBlock&#039; (Name=&#039;&#039;); target property is &#039;Text&#039; (type &#039;String&#039;) InvalidCastException:&#039;System.InvalidCastException: Das Objekt des Typs Bsoft.Berta.DataRowViewWrapper kann nicht in Typ System.Data.DataRowView umgewandelt werden.

I made the jump, scrapped my wrapper and wrote an IListSource, IList, ICustomTypeDescriptor and PropertyDescriptor from scratch, and it works.

Source is ugly as hell right now, need to clean that stuff up until I understand why it works ;)</description>
		<content:encoded><![CDATA[<p>Uhm, stupid me, I didn&#8217;t see the binding error message in the debugger output window:</p>
<p>System.Windows.Data Error: 12 : Cannot get &#8216;Nr&#8217; value (type &#8216;String&#8217;) from &#8221; (type &#8216;DataRowViewWrapper&#8217;). BindingExpression:Path=Nr; DataItem=&#8217;DataRowViewWrapper&#8217; (HashCode=65429669); target element is &#8216;TextBlock&#8217; (Name=&#8221;); target property is &#8216;Text&#8217; (type &#8216;String&#8217;) InvalidCastException:&#8217;System.InvalidCastException: Das Objekt des Typs Bsoft.Berta.DataRowViewWrapper kann nicht in Typ System.Data.DataRowView umgewandelt werden.</p>
<p>I made the jump, scrapped my wrapper and wrote an IListSource, IList, ICustomTypeDescriptor and PropertyDescriptor from scratch, and it works.</p>
<p>Source is ugly as hell right now, need to clean that stuff up until I understand why it works ;)</p>
]]></content:encoded>
	</item>
</channel>
</rss>
