<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:copyright="http://blogs.law.harvard.edu/tech/rss" xmlns:image="http://purl.org/rss/1.0/modules/image/">
    <channel>
        <title>Sql</title>
        <link>http://www.onteorasoftware.com/category/28.aspx</link>
        <description>Sql</description>
        <language>en-US</language>
        <copyright>Ken Tucker</copyright>
        <generator>Subtext Version 2.1.2.2</generator>
        <item>
            <title>MSDN Tikihut tour at Space Coast .Net</title>
            <link>http://blog.onteorasoftware.net/archive/2008/11/07/msdn-tikihut-tour-at-space-coast-.net.aspx</link>
            <description>&lt;table border="0" cellspacing="0" cellpadding="0" width="90%"&gt;
	&lt;tbody&gt;
		&lt;tr&gt;
			&lt;td class="EventInfo" valign="top"&gt;&lt;span&gt;&lt;strong&gt;When:&lt;/strong&gt;&lt;/span&gt;&lt;/td&gt;
			&lt;td class="EventInfo"&gt;
			&lt;div id="eventInfo_StartDatePanel"&gt;
			&lt;span&gt;Wednesday, November 19, 2008 6:30 PM Eastern Time (US &amp;amp; Canada)&lt;/span&gt;
			&lt;/div&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
		&lt;tr&gt;
			&lt;td colspan="2"&gt;   Who: Joe Healy, Jeff Barnes, and Russ Fustino&lt;/td&gt;
		&lt;/tr&gt;
		&lt;tr&gt;
			&lt;td class="EventInfo" colspan="2"&gt;
			&lt;p&gt;
			 
			&lt;/p&gt;
			&lt;p&gt;
			&lt;a href="http://www.dotnettikihut.com/"&gt;http://www.dotnettikihut.com/&lt;/a&gt;
			&lt;/p&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
		&lt;tr&gt;
			&lt;td class="eventInfo" colspan="2"&gt;&lt;br /&gt;
			&lt;strong&gt;&lt;span&gt;Event Overview&lt;/span&gt;&lt;/strong&gt;&lt;/td&gt;
		&lt;/tr&gt;
		&lt;tr&gt;
			&lt;td colspan="2"&gt;
			&lt;div class="eventdetails"&gt;
			&lt;p&gt;
			&lt;span /&gt;
			&lt;/p&gt;
			&lt;p&gt;
			 
			&lt;/p&gt;
			&lt;p style="margin: 0in 0in 0pt" class="MsoNoSpacing"&gt;
			&lt;span style="font-family: Calibri"&gt;&lt;strong&gt;&lt;span style="font-size: 12pt"&gt;Session 1 - What’s New in SQL Server 2008 for Developers - &lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 12pt"&gt;SQL
			Server 2008 adds numerous new capabilities for developers – from
			support for Spatial Data types to a storage mechanism for SQL BLOB data
			using the NTFS file system, and much, much more. The new release also
			delivers several improvements to development-related areas, from T-SQL
			to SQLCLR to XML. This presentation will provide a technical dive into
			the latest and greatest features you’ll find in SQL Server 2008, while
			offering insight into how to effectively apply them to your upcoming
			development projects.&lt;/span&gt;&lt;/span&gt;
			&lt;/p&gt;
			&lt;p style="margin: 0in 0in 0pt" class="MsoNoSpacing"&gt;
			&lt;span style="font-size: 12pt"&gt;&lt;span style="font-family: Calibri"&gt; &lt;/span&gt;&lt;/span&gt;
			&lt;/p&gt;
			&lt;p style="margin: 0in 0in 0pt" class="MsoNoSpacing"&gt;
			&lt;span style="font-family: Calibri"&gt;&lt;strong&gt;&lt;span style="font-size: 12pt"&gt;Session 2 – Build next generation applications with Silverlight 2.0 - &lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 12pt"&gt;Silverlight
			provides a powerful platform for building the next generation of rich
			interactive applications on the Internet. In this session, we’ll take a
			look at the programming model and tools that developers and designers
			can leverage to build these true next generation experiences for
			consumers and business, and demonstrate how to build a rich interactive
			application (RIA) using Silverlight and Microsoft .NET. We’ll explore
			how to use Microsoft Visual Studio to create applications, and &lt;span&gt; &lt;/span&gt;networking, how to retrieve data from a Web service, and various other aspects of building Silverlight applications.&lt;/span&gt;&lt;/span&gt;
			&lt;/p&gt;
			&lt;p style="margin: 0in 0in 0pt" class="MsoNoSpacing"&gt;
			&lt;span style="font-size: 12pt"&gt;&lt;span style="font-family: Calibri"&gt; &lt;/span&gt;&lt;/span&gt;
			&lt;/p&gt;
			&lt;p style="margin: 0in 0in 0pt" class="MsoNoSpacing"&gt;
			&lt;span style="font-family: Calibri"&gt;&lt;strong&gt;&lt;span style="font-size: 12pt"&gt;Session
			3 – Real World Application - How to create an end-to-end Mobile GPS
			tracking application using the .NET Compact Framework, WCF, LINQ,
			Silverlight, Deep Zoom, and Virtual Earth - &lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 12pt"&gt;Inspired
			by a true-story mobility case study recently published on the
			Microsoft.com website, this session will walk you through how to create
			a mobile GPS tracking application using the .NET Compact Framework,
			Windows Mobile SDK, and Compact SQL. &lt;span&gt;  &lt;/span&gt;At the Web host layer, &lt;span&gt;  &lt;/span&gt;we
			will create a Windows Communication Foundation service and generate a
			Compact framework client proxy to send the GPS tracks to a host web
			server - where finally, the GPS trail can then be viewed using LINQ,
			Silverlight, Deep Zoom, and Virtual Earth. &lt;/span&gt;&lt;/span&gt;
			&lt;/p&gt;
			&lt;p style="margin: 0in 0in 0pt" class="MsoNoSpacing"&gt;
			&lt;span style="font-size: 12pt"&gt;&lt;span style="font-family: Calibri"&gt; &lt;/span&gt;&lt;/span&gt;
			&lt;/p&gt;
			&lt;p style="margin: 0in 0in 0pt" class="MsoNoSpacing"&gt;
			&lt;span style="font-family: Calibri"&gt;&lt;strong&gt;&lt;span style="font-size: 12pt"&gt;Optional Session 4 (dependent on available event time) - Power up your Office applications with VSTO - &lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 12pt"&gt;In
			this presentation, we’ll focus on the power and productivity of Visual
			Studio Tools for the Microsoft Office System (VSTO) – a .NET Smart
			Client technology. We’ll give you tips and tricks for designing and
			building smart client applications with VSTO, which allows you to
			create managed code applications with .NET languages including
			Microsoft Visual Basic .NET and Visual C#. VSTO also makes it simple to
			manifest the functionality of those applications in the rich user
			interfaces of Microsoft Office Excel, Word, PowerPoint, Visio, Outlook
			and others from the Office stack. VSTO addresses some of the biggest
			challenges that Office solution developers are facing today, including
			separation of data and view elements, server-side and offline
			scenarios, seamless integration with the Visual Studio tools,
			deployment and updating. Join us for this eye-opening session and learn
			just how easy it is to build and deploy powerful applications with VSTO.&lt;/span&gt;&lt;/span&gt;
			&lt;/p&gt;
			&lt;p&gt;
			 
			&lt;/p&gt;
			&lt;/div&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
	&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;
Please Register if you plan to attend this event.
&lt;/p&gt;
&lt;p&gt;
&lt;a href="https://msevents.microsoft.com/CUI/Register.aspx?culture=en-US&amp;amp;EventID=1032392616&amp;amp;CountryCode=US&amp;amp;IsRedirect=false"&gt;https://msevents.microsoft.com/CUI/Register.aspx?culture=en-US&amp;amp;EventID=1032392616&amp;amp;CountryCode=US&amp;amp;IsRedirect=false&lt;/a&gt;
&lt;/p&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;a href="http://www.dotnetkicks.com/kick/?url=http%3a%2f%2fwww.onteorasoftware.net%2fpost%2fMSDN-Tikihut-tour-at-Space-Coast-Net.aspx"&gt;&lt;img src="http://www.dotnetkicks.com/Services/Images/KickItImageGenerator.ashx?url=http%3a%2f%2fwww.onteorasoftware.net%2fpost%2fMSDN-Tikihut-tour-at-Space-Coast-Net.aspx" border="0" alt="kick it on DotNetKicks.com" /&gt;&lt;/a&gt;
&lt;img src="http://blog.onteorasoftware.net/aggbug/13.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Ken Tucker</dc:creator>
            <guid>http://blog.onteorasoftware.net/archive/2008/11/07/msdn-tikihut-tour-at-space-coast-.net.aspx</guid>
            <pubDate>Fri, 07 Nov 2008 13:45:25 GMT</pubDate>
            <wfw:comment>http://blog.onteorasoftware.net/comments/13.aspx</wfw:comment>
            <comments>http://blog.onteorasoftware.net/archive/2008/11/07/msdn-tikihut-tour-at-space-coast-.net.aspx#feedback</comments>
            <slash:comments>14</slash:comments>
            <wfw:commentRss>http://blog.onteorasoftware.net/comments/commentRss/13.aspx</wfw:commentRss>
        </item>
        <item>
            <title>Sql Management Studio 2008 list database error</title>
            <link>http://blog.onteorasoftware.net/archive/2008/10/29/sql-management-studio-2008-list-database-error.aspx</link>
            <description>&lt;p&gt;I have some sql 2005 databases I need to maintain on a web hosts sql server.  I was able to connect to the sql server fine with sql management studio 2008 but when I tried to expand the databases like I got an error like this.&lt;/p&gt; &lt;p&gt; &lt;/p&gt; &lt;p&gt; &lt;/p&gt; &lt;p&gt;  &lt;/p&gt; &lt;p&gt;&lt;a href="http://www.onteorasoftware.com/image.axd?picture=WindowsLiveWriter/SqlManagementStudio2008listdatabaseerror_6559/image_2.png"&gt;&lt;img style="border-right-width: 0px; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" border="0" alt="image" src="http://www.onteorasoftware.com/image.axd?picture=WindowsLiveWriter/SqlManagementStudio2008listdatabaseerror_6559/image_thumb.png" width="499" height="238" /&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt; &lt;/p&gt; &lt;p&gt;I found this connect item which explains how to fix the issue&lt;/p&gt; &lt;p&gt; &lt;/p&gt; &lt;p&gt;&lt;a title="http://connect.microsoft.com/SQLServer/feedback/ViewFeedback.aspx?FeedbackID=354291" href="http://connect.microsoft.com/SQLServer/feedback/ViewFeedback.aspx?FeedbackID=354291"&gt;http://connect.microsoft.com/SQLServer/feedback/ViewFeedback.aspx?FeedbackID=354291&lt;/a&gt;&lt;/p&gt; &lt;p&gt; &lt;/p&gt; &lt;p&gt;This seems to be similar to SSMS Object Explorer issue discussed here:&lt;br /&gt;http://forums.microsoft.com/msdn/showpost.aspx?postid=3531315&amp;amp;isthread=false&amp;amp;siteid=1&amp;amp;sb=0&amp;amp;d=1&amp;amp;at=7&amp;amp;ft=11&amp;amp;tf=0&amp;amp;pageid=0&lt;br /&gt;Please try using the following workaround and let us know if that helps:&lt;br /&gt;1) Bring Object Explorer Details window by selecting View --&amp;gt; Object Explorer Details in menu (or hitting F7)&lt;br /&gt;2) In Object Explorer window click at Databases folder &lt;br /&gt;3) In Object Explorer Details window right-click at the column header and deselect Collation&lt;br /&gt;4) Refresh Databases folder.  &lt;/p&gt;&lt;p&gt; &lt;/p&gt; &lt;p&gt; &lt;/p&gt; &lt;p&gt;Hope this helps&lt;/p&gt;&lt;img src="http://blog.onteorasoftware.net/aggbug/14.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Ken Tucker</dc:creator>
            <guid>http://blog.onteorasoftware.net/archive/2008/10/29/sql-management-studio-2008-list-database-error.aspx</guid>
            <pubDate>Wed, 29 Oct 2008 05:13:17 GMT</pubDate>
            <wfw:comment>http://blog.onteorasoftware.net/comments/14.aspx</wfw:comment>
            <comments>http://blog.onteorasoftware.net/archive/2008/10/29/sql-management-studio-2008-list-database-error.aspx#feedback</comments>
            <slash:comments>17</slash:comments>
            <wfw:commentRss>http://blog.onteorasoftware.net/comments/commentRss/14.aspx</wfw:commentRss>
        </item>
        <item>
            <title>Uploading a Database to Dotster</title>
            <link>http://blog.onteorasoftware.net/archive/2008/03/12/uploading-a-database-to-dotster.aspx</link>
            <description>&lt;p&gt;
The easiest way to upload a database to dotster is to use the &lt;a href="http://www.codeplex.com/sqlhost"&gt;sql hosting toolkit&lt;/a&gt;.   Visual studio 2008 installs the sql hosting toolkit for you otherwise you need to download and install from the link.  
&lt;/p&gt;
&lt;p&gt;
 
&lt;/p&gt;
&lt;p&gt;
Steps to do this
&lt;/p&gt;
&lt;p&gt;
1) Create a database in the dotster control panel.
&lt;/p&gt;
&lt;p&gt;
2) In the server explorer create a link to the database you want to upload.  
&lt;/p&gt;
&lt;p&gt;
3) Right click on the database and select publish to provider in the wizard make sure you select sql 2000 as the target database schema.
&lt;/p&gt;
&lt;p&gt;
4) On the codeplex website they use to have a webpage available to use to help run the script to create your database.  Now they have a webservice for this.   I kind of think the webservice is over kill to just publish 1 database.  So create a c# website which targets the .net framework 2.0
&lt;/p&gt;
&lt;p&gt;
5) Add the script file you created in step 3 to the website.
&lt;/p&gt;
&lt;p&gt;
6) Add the following code to webpage
&lt;/p&gt;
&lt;p&gt;
using System;&lt;br /&gt;
using System.Collections;&lt;br /&gt;
using System.Configuration;&lt;br /&gt;
using System.Data;&lt;br /&gt;
using System.Text;&lt;br /&gt;
using System.Data.SqlClient;&lt;br /&gt;
using System.Web;&lt;br /&gt;
using System.IO;&lt;br /&gt;
using System.Web.Security;&lt;br /&gt;
using System.Web.UI;&lt;br /&gt;
using System.Web.UI.HtmlControls;&lt;br /&gt;
using System.Web.UI.WebControls;&lt;br /&gt;
using System.Web.UI.WebControls.WebParts;
&lt;/p&gt;
&lt;p&gt;
namespace WebApplication3&lt;br /&gt;
{&lt;br /&gt;
    public partial class _Default : System.Web.UI.Page&lt;br /&gt;
    {&lt;br /&gt;
        protected void Page_Load(object sender, EventArgs e)&lt;br /&gt;
        {&lt;br /&gt;
            string fileName = Server.MapPath(&lt;font face="Lucida Console" size="2"&gt;@"&amp;lt;&amp;lt;YOUR_SCRIPTFILE&amp;gt;&amp;gt;&lt;/font&gt;.SQL");
&lt;/p&gt;
&lt;p&gt;
            // Connection string to the server you want to execute against&lt;br /&gt;
            string connectionString = &lt;font face="Lucida Console" size="2"&gt;@"Server=&amp;lt;&amp;lt;YOUR_SERVER&amp;gt;&amp;gt;;User ID=&amp;lt;&amp;lt;YOUR_USERNAME&amp;gt;&amp;gt;;Password=&amp;lt;&amp;lt;YOUR_PASSWORD&amp;gt;&amp;gt;;Initial Catalog=&amp;lt;&amp;lt;YOUR_DATABASE&amp;gt;&amp;gt;";&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
            // Timeout of batches (in seconds)&lt;br /&gt;
            int timeout = 600;
&lt;/p&gt;
&lt;p&gt;
            SqlConnection conn = null;&lt;br /&gt;
            try&lt;br /&gt;
            {&lt;br /&gt;
                Response.Write(String.Format("Opening file {0}&amp;lt;BR&amp;gt;", fileName));
&lt;/p&gt;
&lt;p&gt;
                // read file&lt;br /&gt;
                using (StreamReader sr = new StreamReader(new FileStream(fileName, FileMode.Open)))&lt;br /&gt;
                {&lt;br /&gt;
                    Response.Write("Connecting to SQL Server database...&amp;lt;BR&amp;gt;");
&lt;/p&gt;
&lt;p&gt;
                    // Create new connection to database&lt;br /&gt;
                    conn = new SqlConnection(connectionString);
&lt;/p&gt;
&lt;p&gt;
                    conn.Open();
&lt;/p&gt;
&lt;p&gt;
                    while (!sr.EndOfStream)&lt;br /&gt;
                    {&lt;br /&gt;
                        StringBuilder sb = new StringBuilder();&lt;br /&gt;
                        SqlCommand cmd = conn.CreateCommand();
&lt;/p&gt;
&lt;p&gt;
                        while (!sr.EndOfStream)&lt;br /&gt;
                        {&lt;br /&gt;
                            string s = sr.ReadLine();&lt;br /&gt;
                            if (s != null &amp;amp;&amp;amp; s.ToUpper().Trim().Equals("GO"))&lt;br /&gt;
                            {&lt;br /&gt;
                                break;&lt;br /&gt;
                            }
&lt;/p&gt;
&lt;p&gt;
                            sb.AppendLine(s);&lt;br /&gt;
                        }
&lt;/p&gt;
&lt;p&gt;
                        // Execute T-SQL against the target database&lt;br /&gt;
                        try&lt;br /&gt;
                        {&lt;br /&gt;
                            cmd.CommandText = sb.ToString();&lt;br /&gt;
                            cmd.CommandTimeout = timeout;
&lt;/p&gt;
&lt;p&gt;
                            cmd.ExecuteNonQuery();
&lt;/p&gt;
&lt;p&gt;
                        }&lt;br /&gt;
                        catch (Exception ex)&lt;br /&gt;
                        {&lt;br /&gt;
                            Response.Write(sb.ToString().Replace("\n", @"&amp;lt;br/&amp;gt;"));&lt;br /&gt;
                            Response.Write(ex.Message.ToString() + @"&amp;lt;br /&amp;gt;");&lt;br /&gt;
                        }&lt;br /&gt;
                    }
&lt;/p&gt;
&lt;p&gt;
                }&lt;br /&gt;
                Response.Write("T-SQL file executed successfully");&lt;br /&gt;
            }&lt;br /&gt;
            catch (Exception ex)&lt;br /&gt;
            {&lt;br /&gt;
                Response.Write(String.Format("An error occured: {0}", ex.ToString()));&lt;br /&gt;
            }&lt;br /&gt;
            finally&lt;br /&gt;
            {&lt;br /&gt;
                // Close out the connection&lt;br /&gt;
                //&lt;br /&gt;
                if (conn != null)&lt;br /&gt;
                {&lt;br /&gt;
                    try&lt;br /&gt;
                    {&lt;br /&gt;
                        conn.Close();&lt;br /&gt;
                        conn.Dispose();&lt;br /&gt;
                    }&lt;br /&gt;
                    catch (Exception e1)&lt;br /&gt;
                    {&lt;br /&gt;
                        Response.Write(String.Format(@"Could not close the connection.  Error was {0}", e1.ToString()));&lt;br /&gt;
                    }&lt;br /&gt;
                }&lt;br /&gt;
            }
&lt;/p&gt;
&lt;p&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
}
&lt;/p&gt;
&lt;p&gt;
 
&lt;/p&gt;
&lt;p&gt;
Uploasd the website to dotster and open the webpage and your database should be copied to the new database.  Make sure you delete the website after you created the database to prevent someone from accidently undo changes to the database after you uploaded it.
&lt;/p&gt;
&lt;img src="http://blog.onteorasoftware.net/aggbug/31.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Ken Tucker</dc:creator>
            <guid>http://blog.onteorasoftware.net/archive/2008/03/12/uploading-a-database-to-dotster.aspx</guid>
            <pubDate>Thu, 13 Mar 2008 02:39:16 GMT</pubDate>
            <wfw:comment>http://blog.onteorasoftware.net/comments/31.aspx</wfw:comment>
            <comments>http://blog.onteorasoftware.net/archive/2008/03/12/uploading-a-database-to-dotster.aspx#feedback</comments>
            <slash:comments>1</slash:comments>
            <wfw:commentRss>http://blog.onteorasoftware.net/comments/commentRss/31.aspx</wfw:commentRss>
        </item>
        <item>
            <title>Sync Services Part 1</title>
            <link>http://blog.onteorasoftware.net/archive/2008/01/27/sync-services-part-1.aspx</link>
            <description>&lt;p&gt;
In this post we will create a local cache of the Northwind database.  To start with lets create a new visual basic windows forms project in Visual Studio 2008.  From the project menu select add a new item and select a new local database cache and name it northwind. 
&lt;/p&gt;
&lt;p&gt;
 
&lt;/p&gt;
&lt;p&gt;
&lt;a href="/image.axd?picture=WindowsLiveWriter/SyncServicesPart1_11DDC/image_2.png"&gt;&lt;img style="border: 0px" src="/image.axd?picture=WindowsLiveWriter/SyncServicesPart1_11DDC/image_thumb.png" border="0" alt="image" width="446" height="322" /&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
 
&lt;/p&gt;
&lt;p&gt;
In the server connect select a connection to the northwind database. 
&lt;/p&gt;
&lt;p&gt;
 
&lt;/p&gt;
&lt;p&gt;
Press the add button and select the product table.  Press OK to close the dialog.  Go ahead and create a table adapter for the product table.  The drag the products table on to the form from the data source window.  Add a button to the binding navigator and set its text to Sync and change the display style to Text. 
&lt;/p&gt;
&lt;p&gt;
 
&lt;/p&gt;
&lt;p&gt;
In the button you added to the toolbar add this code 
&lt;/p&gt;
&lt;p&gt;
 
&lt;/p&gt;
&lt;font size="2" /&gt;&lt;font size="2" color="#0000ff"&gt;Private&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font size="2" color="#0000ff"&gt;Sub&lt;/font&gt;&lt;font size="2"&gt; ToolStripButton1_Click(&lt;/font&gt;&lt;font size="2" color="#0000ff"&gt;ByVal&lt;/font&gt;&lt;font size="2"&gt; sender &lt;/font&gt;&lt;font size="2" color="#0000ff"&gt;As&lt;/font&gt;&lt;font size="2"&gt; System.Object, &lt;/font&gt;&lt;font size="2" color="#0000ff"&gt;ByVal&lt;/font&gt;&lt;font size="2"&gt; e &lt;/font&gt;&lt;font size="2" color="#0000ff"&gt;As&lt;/font&gt;&lt;font size="2"&gt; System.EventArgs) &lt;/font&gt;&lt;font size="2" color="#0000ff"&gt;Handles&lt;/font&gt;&lt;font size="2"&gt; ToolStripButton1.Click&lt;/font&gt;&lt;font size="2"&gt; 
&lt;p&gt;
&lt;font size="2" color="#008000"&gt;       ' Update the database&lt;/font&gt; 
&lt;/p&gt;
&lt;/font&gt;&lt;font size="2" /&gt;&lt;font size="2" color="#0000ff"&gt;        Me&lt;/font&gt;&lt;font size="2"&gt;.ProductsBindingSource.EndEdit()&lt;/font&gt;&lt;font size="2"&gt; &lt;font size="2" color="#0000ff"&gt;        Me&lt;/font&gt;&lt;font size="2"&gt;.TableAdapterManager.UpdateAll(&lt;/font&gt;&lt;font size="2" color="#0000ff"&gt;Me&lt;/font&gt;&lt;font size="2"&gt;.NorthwindDataSet) &lt;/font&gt;&lt;font size="2"&gt;
&lt;p&gt;
&lt;font size="2" color="#008000"&gt;        ' Call SyncAgent.Synchronize() to initiate the synchronization process.&lt;/font&gt; 
&lt;/p&gt;
&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;
&lt;p&gt;
&lt;font size="2" color="#008000"&gt;        ' Synchronization only updates the local database, not your project’s data source.&lt;/font&gt; 
&lt;/p&gt;
&lt;/font&gt;&lt;font size="2" /&gt;&lt;font size="2" color="#0000ff"&gt;        Dim&lt;/font&gt;&lt;font size="2"&gt; syncAgent &lt;/font&gt;&lt;font size="2" color="#0000ff"&gt;As&lt;/font&gt;&lt;font size="2"&gt; ProductsSyncAgent = &lt;/font&gt;&lt;font size="2" color="#0000ff"&gt;New&lt;/font&gt;&lt;font size="2"&gt; ProductsSyncAgent()&lt;/font&gt;&lt;font size="2"&gt; &lt;font size="2" color="#0000ff"&gt;        Dim&lt;/font&gt;&lt;font size="2"&gt; syncStats &lt;/font&gt;&lt;font size="2" color="#0000ff"&gt;As&lt;/font&gt;&lt;font size="2"&gt; Microsoft.Synchronization.Data.SyncStatistics = syncAgent.Synchronize() &lt;/font&gt;&lt;font size="2"&gt;
&lt;p&gt;
&lt;font size="2" color="#008000"&gt;       ' Reload the data source from the local database&lt;/font&gt; 
&lt;/p&gt;
&lt;/font&gt;&lt;/font&gt;&lt;font size="2" /&gt;&lt;font size="2" color="#0000ff"&gt;        Me&lt;/font&gt;&lt;font size="2"&gt;.ProductsTableAdapter.Fill(&lt;/font&gt;&lt;font size="2" color="#0000ff"&gt;Me&lt;/font&gt;&lt;font size="2"&gt;.NorthwindDataSet.Products)&lt;/font&gt;&lt;font size="2"&gt; 
&lt;p&gt;
&lt;font size="2" color="#0000ff"&gt;End&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font size="2" color="#0000ff"&gt;Sub&lt;/font&gt; 
&lt;/p&gt;
&lt;/font&gt;
&lt;p&gt;
Run the app and Open up the Sql Server Management Studio Express.  Make some changes in the Northwind database's Product table and Press the sync button.   
&lt;/p&gt;
&lt;p&gt;
 
&lt;/p&gt;
&lt;p&gt;
Notice the changes you made to the Products table show up in the datagridview.  The changes are also saved in the local sqlce database. 
&lt;/p&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;a href="http://www.dotnetkicks.com/kick/?url=http%3a%2f%2fwww.onteorasoftware.net%2fpost%2fSync-Services-Part-1.aspx"&gt;&lt;img src="http://www.dotnetkicks.com/Services/Images/KickItImageGenerator.ashx?url=http%3a%2f%2fwww.onteorasoftware.net%2fpost%2fSync-Services-Part-1.aspx" border="0" alt="kick it on DotNetKicks.com" width="164" height="30" /&gt;&lt;/a&gt;
&lt;img src="http://blog.onteorasoftware.net/aggbug/36.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Ken Tucker</dc:creator>
            <guid>http://blog.onteorasoftware.net/archive/2008/01/27/sync-services-part-1.aspx</guid>
            <pubDate>Sun, 27 Jan 2008 10:39:25 GMT</pubDate>
            <wfw:comment>http://blog.onteorasoftware.net/comments/36.aspx</wfw:comment>
            <comments>http://blog.onteorasoftware.net/archive/2008/01/27/sync-services-part-1.aspx#feedback</comments>
            <slash:comments>2</slash:comments>
            <wfw:commentRss>http://blog.onteorasoftware.net/comments/commentRss/36.aspx</wfw:commentRss>
        </item>
        <item>
            <title>Sql Endpoint and DataGridView</title>
            <link>http://blog.onteorasoftware.net/archive/2007/09/16/sql-endpoint-and-datagridview.aspx</link>
            <description>&lt;h3 align="center"&gt;Sql Endpoint and DataGridView&lt;/h3&gt;SQL Server 2005 allows you to create webservices for accessing the data in a database.  These webservices are call SQL End Points.  Lets start by creating a stored procedure to get the contact name and there titles for all the customers in the northwind database.  &lt;br /&gt;
&lt;br /&gt;
Create PROCEDURE [dbo].[GetContacts] &lt;br /&gt;
AS&lt;br /&gt;
BEGIN&lt;br /&gt;
    SET NOCOUNT ON;&lt;br /&gt;
&lt;br /&gt;
    SELECT [ContactName],[ContactTitle] FROM Customers ORDER BY [ContactName];&lt;br /&gt;
END&lt;br /&gt;
&lt;br /&gt;
Now we can create the end point.  Note for this example I am using port 88 for the end point to prevent errors if you have IIS installed.&lt;br /&gt;
&lt;br /&gt;
CREATE ENDPOINT NW_Contacts&lt;br /&gt;
    STATE = Started&lt;br /&gt;
AS HTTP&lt;br /&gt;
    (&lt;br /&gt;
        PATH = '/Contacts',&lt;br /&gt;
        AUTHENTICATION = (INTEGRATED),&lt;br /&gt;
        PORTS = (CLEAR),&lt;br /&gt;
CLEAR_PORT = 88,&lt;br /&gt;
        SITE = '*'&lt;br /&gt;
    )&lt;br /&gt;
FOR SOAP&lt;br /&gt;
    (&lt;br /&gt;
        WEBMETHOD 'GetContacts'&lt;br /&gt;
            (NAME = 'Northwind.dbo.GetContacts'),&lt;br /&gt;
        WSDL = DEFAULT,&lt;br /&gt;
        DATABASE = 'Northwind',&lt;br /&gt;
        NAMESPACE = DEFAULT&lt;br /&gt;
    )&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now we need to create a windows forms application.  I called the app EndPointTest.  On the form add a datagridview and set its dock property to fill.&lt;br /&gt;
Then add a web reference to the app.  For the url use http://localhost:88/contacts?WSDL.  For the name I used ContactEndPoint.&lt;br /&gt;
Here is some sample code for filling the datagridview with data from the end point&lt;br /&gt;
&lt;br /&gt;
Imports System.Net&lt;br /&gt;
&lt;br /&gt;
Public Class Form1&lt;br /&gt;
&lt;br /&gt;
    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load&lt;br /&gt;
        Dim ws As New ContactEndPoint.NW_Contacts&lt;br /&gt;
&lt;br /&gt;
        ws.Credentials = CredentialCache.DefaultCredentials&lt;br /&gt;
&lt;br /&gt;
        Dim ds As DataSet = TryCast(ws.GetContacts(0), DataSet)&lt;br /&gt;
        DataGridView1.DataSource = ds.Tables(0)&lt;br /&gt;
&lt;br /&gt;
    End Sub&lt;br /&gt;
End Class
&lt;img src="http://blog.onteorasoftware.net/aggbug/62.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Ken Tucker</dc:creator>
            <guid>http://blog.onteorasoftware.net/archive/2007/09/16/sql-endpoint-and-datagridview.aspx</guid>
            <pubDate>Sun, 16 Sep 2007 22:36:43 GMT</pubDate>
            <wfw:comment>http://blog.onteorasoftware.net/comments/62.aspx</wfw:comment>
            <comments>http://blog.onteorasoftware.net/archive/2007/09/16/sql-endpoint-and-datagridview.aspx#feedback</comments>
            <wfw:commentRss>http://blog.onteorasoftware.net/comments/commentRss/62.aspx</wfw:commentRss>
        </item>
        <item>
            <title>SMO: Connect to Remote Server</title>
            <link>http://blog.onteorasoftware.net/archive/2007/09/16/smo-connect-to-remote-server.aspx</link>
            <description>&lt;h3 align="center"&gt;SMO: Connect to Remote Server&lt;/h3&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;p&gt;
Here is a simple example on connecting to a Remote SQL Server with the SMO class. In this example I use a secure string for the password. 
&lt;/p&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;p&gt;
        Dim srv1 As New Server("ServerName")&lt;br /&gt;
        srv1.ConnectionContext.LoginSecure = False&lt;br /&gt;
        srv1.ConnectionContext.SecurePassword = GetSecureString("Password")&lt;br /&gt;
        srv1.ConnectionContext.Login = "UserName"
&lt;/p&gt;
&lt;p&gt;
  Function GetSecureString(ByVal str As String) As Security.SecureString&lt;br /&gt;
        Dim ss As New System.Security.SecureString
&lt;/p&gt;
&lt;p&gt;
        For Each c As Char In str.ToCharArray&lt;br /&gt;
            ss.AppendChar(c)&lt;br /&gt;
        Next
&lt;/p&gt;
&lt;p&gt;
        ' prevent changes
&lt;/p&gt;
&lt;p&gt;
        ss.MakeReadOnly()&lt;br /&gt;
        Return ss&lt;br /&gt;
    End Function
&lt;/p&gt;
&lt;img src="http://blog.onteorasoftware.net/aggbug/78.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Ken Tucker</dc:creator>
            <guid>http://blog.onteorasoftware.net/archive/2007/09/16/smo-connect-to-remote-server.aspx</guid>
            <pubDate>Sun, 16 Sep 2007 19:29:16 GMT</pubDate>
            <wfw:comment>http://blog.onteorasoftware.net/comments/78.aspx</wfw:comment>
            <comments>http://blog.onteorasoftware.net/archive/2007/09/16/smo-connect-to-remote-server.aspx#feedback</comments>
            <slash:comments>1</slash:comments>
            <wfw:commentRss>http://blog.onteorasoftware.net/comments/commentRss/78.aspx</wfw:commentRss>
        </item>
        <item>
            <title>SQLCLR: Create a custom function</title>
            <link>http://blog.onteorasoftware.net/archive/2007/09/16/sqlclr-create-a-custom-function.aspx</link>
            <description>&lt;h3 align="center"&gt;SQLCLR: Create a custom function&lt;/h3&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;p&gt;
I store a persons full name in the name field of one my sql express database which I wanted to sort by the last name.  Well I could always try a query like this.
&lt;/p&gt;
&lt;p&gt;
SELECT * FROM SPEAKERS ORDER BY SUBSTRING(NAME, PATINDEX('%  %', NAME), LEN(NAME) + 1 - PATINDEX('%  %', NAME))
&lt;/p&gt;
&lt;p&gt;
Unfortuntely some of the names have a middle initial so this method was not fool proof.  This is where SQLCLR came to the rescue.  By creating a SQL Server Project you can create functions with VB.Net code.  So lets create a Sql Server Project and right click on the Project Name in the solution explorer.  Select Add-&amp;gt; User-Defined Function.    Once you add the code below you can use a query like this to sort by last name.
&lt;/p&gt;
&lt;p&gt;
 
&lt;/p&gt;
&lt;p&gt;
&lt;font size="2" color="#a31515"&gt;select * from Speakers order by dbo.LastWord(Name)&lt;/font&gt;&lt;font size="2" color="#a31515" /&gt;
&lt;/p&gt;
&lt;font size="2" color="#0000ff"&gt;
&lt;p&gt;
Imports System&lt;br /&gt;
Imports System.Data&lt;br /&gt;
Imports System.Data.SqlClient&lt;br /&gt;
Imports System.Data.SqlTypes&lt;br /&gt;
Imports Microsoft.SqlServer.Server
&lt;/p&gt;
&lt;p&gt;
Partial Public Class UserDefinedFunctions&lt;br /&gt;
    &amp;lt;Microsoft.SqlServer.Server.SqlFunction()&amp;gt; _&lt;br /&gt;
    Public Shared Function LastWord(ByVal word As SqlString) As SqlString&lt;br /&gt;
        ' Add your code here&lt;br /&gt;
        Dim strWords() As String = word.ToString.Split(" "c)&lt;br /&gt;
        Return New SqlString(strWords(strWords.GetUpperBound(0)))&lt;br /&gt;
    End Function&lt;br /&gt;
End Class
&lt;/p&gt;
&lt;/font&gt;
&lt;p&gt;
&lt;font size="2" color="#0000ff" /&gt;
&lt;/p&gt;
&lt;img src="http://blog.onteorasoftware.net/aggbug/81.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Ken Tucker</dc:creator>
            <guid>http://blog.onteorasoftware.net/archive/2007/09/16/sqlclr-create-a-custom-function.aspx</guid>
            <pubDate>Sun, 16 Sep 2007 19:24:11 GMT</pubDate>
            <wfw:comment>http://blog.onteorasoftware.net/comments/81.aspx</wfw:comment>
            <comments>http://blog.onteorasoftware.net/archive/2007/09/16/sqlclr-create-a-custom-function.aspx#feedback</comments>
            <slash:comments>1</slash:comments>
            <wfw:commentRss>http://blog.onteorasoftware.net/comments/commentRss/81.aspx</wfw:commentRss>
        </item>
        <item>
            <title>SQL Server 2005 SP 1 help</title>
            <link>http://blog.onteorasoftware.net/archive/2007/09/16/sql-server-2005-sp-1-help.aspx</link>
            <description>&lt;h3 align="center"&gt;SQL Server 2005 SP 1 help&lt;/h3&gt;&lt;br /&gt;
&lt;br /&gt;
From my partner Kelly Martins at &lt;a href="http://www.kjmsolutions.com"&gt;KJM Solutions&lt;/a&gt; &lt;br /&gt;
&lt;br /&gt;
If this error occurs here is what worked for me. I hope it may work for you but am not sure. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In my case I had SQL Express 2005 Installer on my system as well as I run both (one for development, one for production). &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Shut down all SQL related services manually. &lt;br /&gt;
&lt;br /&gt;
I set registry permissions on Software\Policies\Microsoft\Windows\Installer to include the account that is doing the install with Full Control. Click Advanced and make sure everything is selected. &lt;br /&gt;
&lt;br /&gt;
I downloaded and ran the SQL Install Cleanup and removed the SQL 2005 Setup Files Installer and the SQL Express Installer. I then reinstalled the SQL Setup Files (ONLY!!!!!) from my SQL Server 2005 CD. If you don't don't do this you won't be able to use the SP. &lt;br /&gt;
&lt;br /&gt;
&lt;a href="http://support.microsoft.com/support/kb/articles/q290/3/01.asp"&gt;Q290301 OFFXP: Windows Installer CleanUp Utility&lt;/a&gt; &lt;br /&gt;
&lt;br /&gt;
I then reinstalled the SP and it worked 
&lt;img src="http://blog.onteorasoftware.net/aggbug/115.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Ken Tucker</dc:creator>
            <guid>http://blog.onteorasoftware.net/archive/2007/09/16/sql-server-2005-sp-1-help.aspx</guid>
            <pubDate>Sun, 16 Sep 2007 18:31:26 GMT</pubDate>
            <wfw:comment>http://blog.onteorasoftware.net/comments/115.aspx</wfw:comment>
            <comments>http://blog.onteorasoftware.net/archive/2007/09/16/sql-server-2005-sp-1-help.aspx#feedback</comments>
            <slash:comments>1</slash:comments>
            <wfw:commentRss>http://blog.onteorasoftware.net/comments/commentRss/115.aspx</wfw:commentRss>
        </item>
        <item>
            <title>SQL Everywhere</title>
            <link>http://blog.onteorasoftware.net/archive/2007/09/16/sql-everywhere.aspx</link>
            <description>&lt;h3 align="center"&gt;SQL Everywhere&lt;/h3&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;p&gt;
Microsoft will be removing the restrictions on sql sever 2005 mobile edition so it works in a desktop environment. Check out the SQL everywhere FAQ on &lt;a href="http://blogs.msdn.com/stevelasker/archive/2006/04/10/SqlEverywhereInfo.aspx"&gt;Steve Lasker's blog&lt;/a&gt; 
&lt;/p&gt;
&lt;br /&gt;
&lt;img src="http://blog.onteorasoftware.net/aggbug/119.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Ken Tucker</dc:creator>
            <guid>http://blog.onteorasoftware.net/archive/2007/09/16/sql-everywhere.aspx</guid>
            <pubDate>Sun, 16 Sep 2007 18:29:39 GMT</pubDate>
            <wfw:comment>http://blog.onteorasoftware.net/comments/119.aspx</wfw:comment>
            <comments>http://blog.onteorasoftware.net/archive/2007/09/16/sql-everywhere.aspx#feedback</comments>
            <slash:comments>1</slash:comments>
            <wfw:commentRss>http://blog.onteorasoftware.net/comments/commentRss/119.aspx</wfw:commentRss>
        </item>
        <item>
            <title>Sql Server 2005 Service Pack 1</title>
            <link>http://blog.onteorasoftware.net/archive/2007/09/16/sql-server-2005-service-pack-1.aspx</link>
            <description>&lt;h3 align="center"&gt;Sql Server 2005 Service Pack 1&lt;/h3&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;p&gt;
I see there is a CTP for a Sql Server 2005 service pack available. &lt;a href="http://www.microsoft.com/sql/ctp_sp1.mspx"&gt;Here&lt;/a&gt; is a link for anyone interested. 
&lt;/p&gt;
&lt;br /&gt;
&lt;img src="http://blog.onteorasoftware.net/aggbug/123.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Ken Tucker</dc:creator>
            <guid>http://blog.onteorasoftware.net/archive/2007/09/16/sql-server-2005-service-pack-1.aspx</guid>
            <pubDate>Sun, 16 Sep 2007 18:07:08 GMT</pubDate>
            <wfw:comment>http://blog.onteorasoftware.net/comments/123.aspx</wfw:comment>
            <comments>http://blog.onteorasoftware.net/archive/2007/09/16/sql-server-2005-service-pack-1.aspx#feedback</comments>
            <slash:comments>1</slash:comments>
            <wfw:commentRss>http://blog.onteorasoftware.net/comments/commentRss/123.aspx</wfw:commentRss>
        </item>
    </channel>
</rss>