<?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: Silverlight 2 (beta1) &#8211; Database Operations with ASP.NET Web Service in Silverlight 2</title>
	<atom:link href="http://michaelsync.net/2008/03/10/silverlight-2-beta1-database-operations-with-aspnet-web-service-in-silverlight-2/feed" rel="self" type="application/rss+xml" />
	<link>http://michaelsync.net/2008/03/10/silverlight-2-beta1-database-operations-with-aspnet-web-service-in-silverlight-2</link>
	<description>Sharing our knowledge</description>
	<lastBuildDate>Mon, 30 Apr 2012 09:19:41 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=</generator>
<atom:link rel="hub" href="http://pubsubhubbub.appspot.com"/><atom:link rel="hub" href="http://superfeedr.com/hubbub"/>	<item>
		<title>By: Tomcat</title>
		<link>http://michaelsync.net/2008/03/10/silverlight-2-beta1-database-operations-with-aspnet-web-service-in-silverlight-2/comment-page-3#comment-267428</link>
		<dc:creator>Tomcat</dc:creator>
		<pubDate>Wed, 15 Dec 2010 10:35:40 +0000</pubDate>
		<guid isPermaLink="false">http://michaelsync.net/2008/03/10/silverlight-2-beta1-database-operations-with-aspnet-web-service-in-silverlight-2#comment-267428</guid>
		<description>Hi Mr. Sync, I have solved my problem. Thank you for your share  :)</description>
		<content:encoded><![CDATA[<p>Hi Mr. Sync, I have solved my problem. Thank you for your share  :)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tomcat</title>
		<link>http://michaelsync.net/2008/03/10/silverlight-2-beta1-database-operations-with-aspnet-web-service-in-silverlight-2/comment-page-3#comment-267389</link>
		<dc:creator>Tomcat</dc:creator>
		<pubDate>Wed, 15 Dec 2010 07:17:13 +0000</pubDate>
		<guid isPermaLink="false">http://michaelsync.net/2008/03/10/silverlight-2-beta1-database-operations-with-aspnet-web-service-in-silverlight-2#comment-267389</guid>
		<description>Hi Michael Sync, please tell me where I can find ListingControl.xam.cs? Everything is ok but in the final step, I can&#039;t find that file.

Quoted from you: &quot;Please take a look at “ListingControl.xaml.cs. You will see the following code that retrieve the data from Web Service&quot;...

Thank you.</description>
		<content:encoded><![CDATA[<p>Hi Michael Sync, please tell me where I can find ListingControl.xam.cs? Everything is ok but in the final step, I can&#8217;t find that file.</p>
<p>Quoted from you: &#8220;Please take a look at “ListingControl.xaml.cs. You will see the following code that retrieve the data from Web Service&#8221;&#8230;</p>
<p>Thank you.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dan W</title>
		<link>http://michaelsync.net/2008/03/10/silverlight-2-beta1-database-operations-with-aspnet-web-service-in-silverlight-2/comment-page-3#comment-241769</link>
		<dc:creator>Dan W</dc:creator>
		<pubDate>Fri, 23 Jul 2010 09:45:04 +0000</pubDate>
		<guid isPermaLink="false">http://michaelsync.net/2008/03/10/silverlight-2-beta1-database-operations-with-aspnet-web-service-in-silverlight-2#comment-241769</guid>
		<description>Hi Michael,

can this be used to connect to a Sybase db?

thanks

Dan</description>
		<content:encoded><![CDATA[<p>Hi Michael,</p>
<p>can this be used to connect to a Sybase db?</p>
<p>thanks</p>
<p>Dan</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: kannan</title>
		<link>http://michaelsync.net/2008/03/10/silverlight-2-beta1-database-operations-with-aspnet-web-service-in-silverlight-2/comment-page-3#comment-214625</link>
		<dc:creator>kannan</dc:creator>
		<pubDate>Thu, 25 Feb 2010 13:05:15 +0000</pubDate>
		<guid isPermaLink="false">http://michaelsync.net/2008/03/10/silverlight-2-beta1-database-operations-with-aspnet-web-service-in-silverlight-2#comment-214625</guid>
		<description>pls give me a simple sample application, where i can connect to a database and retrieve data and display in Silverlight Data grid contron in a silverlight application..</description>
		<content:encoded><![CDATA[<p>pls give me a simple sample application, where i can connect to a database and retrieve data and display in Silverlight Data grid contron in a silverlight application..</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Siddharth Dahiya</title>
		<link>http://michaelsync.net/2008/03/10/silverlight-2-beta1-database-operations-with-aspnet-web-service-in-silverlight-2/comment-page-3#comment-194411</link>
		<dc:creator>Siddharth Dahiya</dc:creator>
		<pubDate>Tue, 01 Sep 2009 20:48:46 +0000</pubDate>
		<guid isPermaLink="false">http://michaelsync.net/2008/03/10/silverlight-2-beta1-database-operations-with-aspnet-web-service-in-silverlight-2#comment-194411</guid>
		<description>Hey Michael,

I need to retrieve data from my MSSQL server for a silverlight App. The problem is that if I do make a webservice and set it up, I will be putting it on the testing server ONLY. When the project is complete and the data is transfered to the deployment server, there is a posibility that the server IP/URL might change. therefore, can you make a suggestion as to how I should retrieve data from the SQL? the server is going to be static so I know the database will be where it is now.

Also, I also tried to make a blank aspx page that writes the required data to the response stream. But silverlight does not allow to download the contents of the web page.

Any suggestions?</description>
		<content:encoded><![CDATA[<p>Hey Michael,</p>
<p>I need to retrieve data from my MSSQL server for a silverlight App. The problem is that if I do make a webservice and set it up, I will be putting it on the testing server ONLY. When the project is complete and the data is transfered to the deployment server, there is a posibility that the server IP/URL might change. therefore, can you make a suggestion as to how I should retrieve data from the SQL? the server is going to be static so I know the database will be where it is now.</p>
<p>Also, I also tried to make a blank aspx page that writes the required data to the response stream. But silverlight does not allow to download the contents of the web page.</p>
<p>Any suggestions?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Viral Patel</title>
		<link>http://michaelsync.net/2008/03/10/silverlight-2-beta1-database-operations-with-aspnet-web-service-in-silverlight-2/comment-page-2#comment-193882</link>
		<dc:creator>Viral Patel</dc:creator>
		<pubDate>Sat, 29 Aug 2009 06:46:12 +0000</pubDate>
		<guid isPermaLink="false">http://michaelsync.net/2008/03/10/silverlight-2-beta1-database-operations-with-aspnet-web-service-in-silverlight-2#comment-193882</guid>
		<description>hi....

Can U provide how to insert ,update,Delete modify DAta in Database Table using SQL query and LinQ with ADO.NET dataservices.

thx in advance


Nice site....!! Have Nice Day..</description>
		<content:encoded><![CDATA[<p>hi&#8230;.</p>
<p>Can U provide how to insert ,update,Delete modify DAta in Database Table using SQL query and LinQ with ADO.NET dataservices.</p>
<p>thx in advance</p>
<p>Nice site&#8230;.!! Have Nice Day..</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Alexandra</title>
		<link>http://michaelsync.net/2008/03/10/silverlight-2-beta1-database-operations-with-aspnet-web-service-in-silverlight-2/comment-page-2#comment-179580</link>
		<dc:creator>Alexandra</dc:creator>
		<pubDate>Fri, 19 Jun 2009 23:32:23 +0000</pubDate>
		<guid isPermaLink="false">http://michaelsync.net/2008/03/10/silverlight-2-beta1-database-operations-with-aspnet-web-service-in-silverlight-2#comment-179580</guid>
		<description>Hi Michael, 

First of all I want to say that I am kind of new in the programming world. I have a problem and maybe you can help me.
I made everything step by step, but I can&#039;t insert new information in table. I even get the message that the &quot;New Product has been saved successfully&quot; but nothing changes in the table.
I changed a little the web service for what I needed.
Is there something wrong with the code? Maybe the sintax, I don&#039;t really know because the program is error free.

 [WebMethod]
    public bool CreateProduct(string TextBox_Prenume, string TextBox_Nume, 
        int ComoBox_Zi, int ComoBox_Luna, int ComoBox_An, string Sexmf, 
        string TextBox_AdresaEmail, string parola)
    {
        try
        {
            SqlConnection _sqlConnection = new SqlConnection();
            _sqlConnection.ConnectionString = ConfigurationManager.ConnectionStrings[&quot;sqlConnectionString&quot;].ToString();
            _sqlConnection.Open();

            SqlCommand command = new SqlCommand();
            command.Connection = _sqlConnection;
            command.CommandType = CommandType.Text;
            command.CommandText = &quot;INSERT INTO Utilizatori(Prenume, Nume, Zi, Luna, An, Sex, AdresaEmail)VALUES(&#039;&quot; + TextBox_Prenume.ToString().Replace(&quot;&#039;&quot;, &quot;&#039;&#039;&quot;) + &quot;&#039;,&#039;&quot; + TextBox_Nume.ToString().Replace(&quot;&#039;&quot;, &quot;&#039;&#039;&quot;) +
&quot;&#039;,&#039;&quot; + ComoBox_Zi.ToString().Replace(&quot;&#039;&quot;, &quot;&#039;&#039;&quot;) +
&quot;&#039;,&#039;&quot; + ComoBox_Luna.ToString().Replace(&quot;&#039;&quot;, &quot;&#039;&#039;&quot;) + 
&quot;&#039;,&#039;&quot; + ComoBox_An.ToString().Replace(&quot;&#039;&quot;, &quot;&#039;&#039;&quot;) + 
&quot;&#039;,&#039;&quot; + Sexmf.ToString().Replace(&quot;&#039;&quot;, &quot;&#039;&#039;&quot;) + 
&quot;&#039;,&#039;&quot; + TextBox_AdresaEmail.ToString().Replace(&quot;&#039;&quot;, &quot;&#039;&#039;&quot;)+
&quot;&#039;,&#039;&quot; + parola.ToString().Replace(&quot;&#039;&quot;, &quot;&#039;&#039;&quot;) + &quot;&#039;)&quot;;
            command.ExecuteNonQuery();
            _sqlConnection.Close();
            return true;

        }
        catch (Exception ex)
        {
            return false;
        }
    }

Thank you very much.</description>
		<content:encoded><![CDATA[<p>Hi Michael, </p>
<p>First of all I want to say that I am kind of new in the programming world. I have a problem and maybe you can help me.<br />
I made everything step by step, but I can&#8217;t insert new information in table. I even get the message that the &#8220;New Product has been saved successfully&#8221; but nothing changes in the table.<br />
I changed a little the web service for what I needed.<br />
Is there something wrong with the code? Maybe the sintax, I don&#8217;t really know because the program is error free.</p>
<p> [WebMethod]<br />
    public bool CreateProduct(string TextBox_Prenume, string TextBox_Nume,<br />
        int ComoBox_Zi, int ComoBox_Luna, int ComoBox_An, string Sexmf,<br />
        string TextBox_AdresaEmail, string parola)<br />
    {<br />
        try<br />
        {<br />
            SqlConnection _sqlConnection = new SqlConnection();<br />
            _sqlConnection.ConnectionString = ConfigurationManager.ConnectionStrings["sqlConnectionString"].ToString();<br />
            _sqlConnection.Open();</p>
<p>            SqlCommand command = new SqlCommand();<br />
            command.Connection = _sqlConnection;<br />
            command.CommandType = CommandType.Text;<br />
            command.CommandText = &#8220;INSERT INTO Utilizatori(Prenume, Nume, Zi, Luna, An, Sex, AdresaEmail)VALUES(&#8216;&#8221; + TextBox_Prenume.ToString().Replace(&#8220;&#8216;&#8221;, &#8220;&#8221;&#8221;) + &#8220;&#8216;,&#8217;&#8221; + TextBox_Nume.ToString().Replace(&#8220;&#8216;&#8221;, &#8220;&#8221;&#8221;) +<br />
&#8220;&#8216;,&#8217;&#8221; + ComoBox_Zi.ToString().Replace(&#8220;&#8216;&#8221;, &#8220;&#8221;&#8221;) +<br />
&#8220;&#8216;,&#8217;&#8221; + ComoBox_Luna.ToString().Replace(&#8220;&#8216;&#8221;, &#8220;&#8221;&#8221;) +<br />
&#8220;&#8216;,&#8217;&#8221; + ComoBox_An.ToString().Replace(&#8220;&#8216;&#8221;, &#8220;&#8221;&#8221;) +<br />
&#8220;&#8216;,&#8217;&#8221; + Sexmf.ToString().Replace(&#8220;&#8216;&#8221;, &#8220;&#8221;&#8221;) +<br />
&#8220;&#8216;,&#8217;&#8221; + TextBox_AdresaEmail.ToString().Replace(&#8220;&#8216;&#8221;, &#8220;&#8221;&#8221;)+<br />
&#8220;&#8216;,&#8217;&#8221; + parola.ToString().Replace(&#8220;&#8216;&#8221;, &#8220;&#8221;&#8221;) + &#8220;&#8216;)&#8221;;<br />
            command.ExecuteNonQuery();<br />
            _sqlConnection.Close();<br />
            return true;</p>
<p>        }<br />
        catch (Exception ex)<br />
        {<br />
            return false;<br />
        }<br />
    }</p>
<p>Thank you very much.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: 2TIND Groep8: Silverlight</title>
		<link>http://michaelsync.net/2008/03/10/silverlight-2-beta1-database-operations-with-aspnet-web-service-in-silverlight-2/comment-page-2#comment-174839</link>
		<dc:creator>2TIND Groep8: Silverlight</dc:creator>
		<pubDate>Mon, 01 Jun 2009 12:09:06 +0000</pubDate>
		<guid isPermaLink="false">http://michaelsync.net/2008/03/10/silverlight-2-beta1-database-operations-with-aspnet-web-service-in-silverlight-2#comment-174839</guid>
		<description>[...] http://michaelsync.net/2008/03/10/silverlight-2-beta1-database-operations-with-aspnet-web-service-in... [...]</description>
		<content:encoded><![CDATA[<p>[...] <a href="http://michaelsync.net/2008/03/10/silverlight-2-beta1-database-operations-with-aspnet-web-service-in" rel="nofollow">http://michaelsync.net/2008/03/10/silverlight-2-beta1-database-operations-with-aspnet-web-service-in</a>&#8230; [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rama</title>
		<link>http://michaelsync.net/2008/03/10/silverlight-2-beta1-database-operations-with-aspnet-web-service-in-silverlight-2/comment-page-2#comment-172006</link>
		<dc:creator>Rama</dc:creator>
		<pubDate>Wed, 20 May 2009 11:21:37 +0000</pubDate>
		<guid isPermaLink="false">http://michaelsync.net/2008/03/10/silverlight-2-beta1-database-operations-with-aspnet-web-service-in-silverlight-2#comment-172006</guid>
		<description>Hi Michael,
           I just gone through your site and happy to say &quot;U r the man&quot; really helping us.

I have one query. My job is to get the Entity information from CRM and populate the date into Silver Light Webpage. For this I added the webservice and almost done everything. My problem is I am unable to retrieve the data and show it on Silver Light page. Can u just guide me step by step by code how to retieve the data through web service? Is it not possible to show the data into silver light directly without using any Input say &quot;btn click&quot;. Pls help me and thanks a ton in advance.</description>
		<content:encoded><![CDATA[<p>Hi Michael,<br />
           I just gone through your site and happy to say &#8220;U r the man&#8221; really helping us.</p>
<p>I have one query. My job is to get the Entity information from CRM and populate the date into Silver Light Webpage. For this I added the webservice and almost done everything. My problem is I am unable to retrieve the data and show it on Silver Light page. Can u just guide me step by step by code how to retieve the data through web service? Is it not possible to show the data into silver light directly without using any Input say &#8220;btn click&#8221;. Pls help me and thanks a ton in advance.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: brian flowers</title>
		<link>http://michaelsync.net/2008/03/10/silverlight-2-beta1-database-operations-with-aspnet-web-service-in-silverlight-2/comment-page-2#comment-170996</link>
		<dc:creator>brian flowers</dc:creator>
		<pubDate>Wed, 13 May 2009 08:01:11 +0000</pubDate>
		<guid isPermaLink="false">http://michaelsync.net/2008/03/10/silverlight-2-beta1-database-operations-with-aspnet-web-service-in-silverlight-2#comment-170996</guid>
		<description>Thanks for your excellent  tutorials on ado data services.  However, I having a problem with accessing stored procedures in our database, that returns data from a cross-join, with X number of columns.  Below is some sample code.  

When I go to show the data service in the browser, I get a Request Error - The server encountered an error processing the request. See server logs for more details.


What&#039;s a good approch for dealing with this type of dynamic data?

Thanks for you help,

Brian



Imports System.Data.Services
Imports System.Linq
Imports System.ServiceModel.Web
Imports System.Data.SqlClient
Imports System.Web
Imports System



Public Class PlayerDataServices

    Inherits DataService(Of [PlayerEntities])

    Public Shared Sub InitializeService(ByVal config As IDataServiceConfiguration)

        config.SetEntitySetAccessRule(&quot;Player&quot;, EntitySetRights.AllRead)
        config.SetServiceOperationAccessRule(&quot;*&quot;, ServiceOperationRights.All)
    End Sub


     _
    Public Function FetchPlayerStats(ByVal PlayerId As Integer, ByVal HeaderId As Integer, ByVal Year As Integer) As IEnumerable(Of DataRow)

        Dim ds As DataSet = New DataSet(&quot;PlayerStats&quot;)
        Dim da As SqlDataAdapter = New SqlDataAdapter()

        Try

            Using sqlConn As New SqlConnection(My.Settings.DBCn)
                Using sqlCmd As New SqlCommand(&quot;uspLIST_Stats&quot;, sqlConn)
                    sqlCmd.CommandType = CommandType.StoredProcedure
                    sqlCmd.Parameters.AddWithValue(&quot;id&quot;, PlayerId)
                    sqlCmd.Parameters.AddWithValue(&quot;HeaderID&quot;, HeaderId)
                    sqlCmd.Parameters.AddWithValue(&quot;Year&quot;, Year)
                    sqlConn.Open()

                    da.SelectCommand = sqlCmd
                    da.Fill(ds)
                End Using
                sqlConn.Close()
            End Using

        Catch ex As Exception
        End Try

        Return ds.Tables(0).AsEnumerable
    End Function
End Class</description>
		<content:encoded><![CDATA[<p>Thanks for your excellent  tutorials on ado data services.  However, I having a problem with accessing stored procedures in our database, that returns data from a cross-join, with X number of columns.  Below is some sample code.  </p>
<p>When I go to show the data service in the browser, I get a Request Error &#8211; The server encountered an error processing the request. See server logs for more details.</p>
<p>What&#8217;s a good approch for dealing with this type of dynamic data?</p>
<p>Thanks for you help,</p>
<p>Brian</p>
<p>Imports System.Data.Services<br />
Imports System.Linq<br />
Imports System.ServiceModel.Web<br />
Imports System.Data.SqlClient<br />
Imports System.Web<br />
Imports System</p>
<p>Public Class PlayerDataServices</p>
<p>    Inherits DataService(Of [PlayerEntities])</p>
<p>    Public Shared Sub InitializeService(ByVal config As IDataServiceConfiguration)</p>
<p>        config.SetEntitySetAccessRule(&#8220;Player&#8221;, EntitySetRights.AllRead)<br />
        config.SetServiceOperationAccessRule(&#8220;*&#8221;, ServiceOperationRights.All)<br />
    End Sub</p>
<p>     _<br />
    Public Function FetchPlayerStats(ByVal PlayerId As Integer, ByVal HeaderId As Integer, ByVal Year As Integer) As IEnumerable(Of DataRow)</p>
<p>        Dim ds As DataSet = New DataSet(&#8220;PlayerStats&#8221;)<br />
        Dim da As SqlDataAdapter = New SqlDataAdapter()</p>
<p>        Try</p>
<p>            Using sqlConn As New SqlConnection(My.Settings.DBCn)<br />
                Using sqlCmd As New SqlCommand(&#8220;uspLIST_Stats&#8221;, sqlConn)<br />
                    sqlCmd.CommandType = CommandType.StoredProcedure<br />
                    sqlCmd.Parameters.AddWithValue(&#8220;id&#8221;, PlayerId)<br />
                    sqlCmd.Parameters.AddWithValue(&#8220;HeaderID&#8221;, HeaderId)<br />
                    sqlCmd.Parameters.AddWithValue(&#8220;Year&#8221;, Year)<br />
                    sqlConn.Open()</p>
<p>                    da.SelectCommand = sqlCmd<br />
                    da.Fill(ds)<br />
                End Using<br />
                sqlConn.Close()<br />
            End Using</p>
<p>        Catch ex As Exception<br />
        End Try</p>
<p>        Return ds.Tables(0).AsEnumerable<br />
    End Function<br />
End Class</p>
]]></content:encoded>
	</item>
</channel>
</rss>

