﻿<?xml version='1.0' encoding='UTF-8'?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>StrataFrame Forum / StrataFrame Database Deployment Toolkit / Database Deployment Toolkit (How do I?)  / SampleDataInstallerClass -&amp;gt; cross-thread error... / Latest Posts</title><generator>InstantForum.NET v4.1.4</generator><description>StrataFrame Forum</description><link>http://forum.strataframe.net/</link><webMaster>forum@strataframe.net</webMaster><lastBuildDate>Sat, 05 Jul 2008 19:53:15 GMT</lastBuildDate><ttl>20</ttl><item><title>RE: SampleDataInstallerClass -&amp;gt; cross-thread error...</title><link>http://forum.strataframe.net/Topic13684-11-1.aspx</link><description>Hi Trent! &lt;P&gt;[quote]That would probably be a good idea.  Just to make sure that you are aware...[/quote] &lt;P&gt;Yes, Trent. I'm aware and that's really cool. :cool: &lt;P&gt;But it would be even cooler, not to have to do that. &lt;P&gt;Please don't get me wrong, SF is a great framework and I love it. I tried a few others and found SF seems to fit my needs best, especially the data deployment tool. This tool makes SF a real time saver when installing data for applications. Unfortunately this really important tool is not localized, which causes me to 'create my own deployment environment for an install'. It would be really great not to have to do that. I hope I can put my own development environment into a trash-can some time soon... ;) &lt;P&gt;Thank you very much and friendly greetings, &lt;P&gt;Ralph</description><pubDate>Sun, 29 Jun 2008 01:35:17 GMT</pubDate><dc:creator>Ralph Rutschmann</dc:creator></item><item><title>RE: SampleDataInstallerClass -&amp;gt; cross-thread error...</title><link>http://forum.strataframe.net/Topic13684-11-1.aspx</link><description>[quote]But could you localization issues also take into account? It would save me (and other international customers too) tons of work...[/quote]&lt;/P&gt;&lt;P&gt;That would probably be a good idea.  Just to make sure that you are aware...you can create your own deployment dialogs right now as we speak.  In fact, the framework comes with a sample showing how to do this so you can create your own deployment environment for an install or whatever need you have there.  This is what we do for our medical software as well as the SF installation.  This is just a thought so you could move forward without having to wait on me :)</description><pubDate>Sat, 28 Jun 2008 12:32:10 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item><item><title>RE: SampleDataInstallerClass -&amp;gt; cross-thread error...</title><link>http://forum.strataframe.net/Topic13684-11-1.aspx</link><description>Hello Trent,&lt;P&gt;[quote]I am unsure why your environment would act differently.[/quote]&lt;/P&gt;&lt;P&gt;sometimes it worked as expected, somtimes I got a cross-thread error.&lt;/P&gt;&lt;P&gt;[quote]I looked through the code to ensure that there was no cross-thread violations...and I did not see any.[/quote]&lt;/P&gt;&lt;P&gt;Accessing the combobox from inside the DoWork-Method is causing the error. The combobox is an element instantiated outside the DoWork thread of the BackgroundWorker and therefore lies at another thread, I guess. I don't know why it is working sometimes, but I don't know at all why Windows is working sometimes, or not... ;)&lt;/P&gt;&lt;P&gt;[quote]However, we are about to rework this dialog anyway, so I will be sure to take this into account![/quote]&lt;/P&gt;&lt;P&gt;Thank you very much, this will be great! :)&lt;/P&gt;&lt;P&gt;But could you localization issues also take into account? It would save me (and other international customers too) tons of work...&lt;/P&gt;&lt;P&gt;Thank you very much and friendly greetings,&lt;/P&gt;&lt;P&gt;Ralph&lt;BR&gt;</description><pubDate>Sat, 28 Jun 2008 03:36:44 GMT</pubDate><dc:creator>Ralph Rutschmann</dc:creator></item><item><title>RE: SampleDataInstallerClass -&amp;gt; cross-thread error...</title><link>http://forum.strataframe.net/Topic13684-11-1.aspx</link><description>I am glad that you got it working.  I am unsure why your environment would act differently.  I looked through the code to ensure that there was no cross-thread violations...and I did not see any.  However, we are about to rework this dialog anyway, so I will be sure to take this into account!&lt;/P&gt;&lt;P&gt;Thanks for your information and efforts!!!!</description><pubDate>Fri, 27 Jun 2008 13:07:41 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item><item><title>RE: SampleDataInstallerClass -&amp;gt; cross-thread error...</title><link>http://forum.strataframe.net/Topic13684-11-1.aspx</link><description>Hello Trent! :)&lt;P&gt;Meanwhile I kicked off my old AMD equipment and own a brand new Intel machine now. :D&lt;/P&gt;&lt;P&gt;I installed all completly new from the scratch, Windows XP Professional, VS 2008 and the newest StrataFrame-Beta.&lt;/P&gt;&lt;P&gt;Unfortunately the problem persists, even with the new machine. It seems not to have something to do with AMD or Intel.&lt;/P&gt;&lt;P&gt;So I took a look what MicroSoft does with the Backgroundworker, which should have something to do with the error. I saw, that the examples from MS avoid any access to the GUI, from inside the doWork-Method. I tried to modify the source code, but found that not a good idea, because I do not want to modify the code again and again with any new release of SF.&lt;/P&gt;&lt;P&gt;I decided to translate the DeployDialogs-MDDDeployMain to C# and to modify it to my needs, using as much of the framework as I could.&lt;/P&gt;&lt;P&gt;And guess what? Right, the problem went away! :D&lt;/P&gt;&lt;P&gt;Here is, what I did (among others):&lt;/P&gt;&lt;P&gt;[codesnippet]&lt;FONT color=#0000ff size=2&gt;&lt;/P&gt;&lt;P&gt;private&lt;/FONT&gt;&lt;FONT color=#000000 size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;void&lt;/FONT&gt;&lt;FONT color=#000000 size=2&gt; cboSQLServer_DropDown(&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;object&lt;/FONT&gt;&lt;FONT color=#000000 size=2&gt; sender, &lt;/FONT&gt;&lt;FONT color=#2b91af size=2&gt;EventArgs&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;FONT color=#000000&gt; e)&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;if&lt;/FONT&gt;&lt;FONT size=2&gt; (!_ServersLoaded)&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;_ServersLoaded = &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;true&lt;/FONT&gt;&lt;FONT size=2&gt;;&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#008000 size=2&gt;//-- Clear the combo&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;this&lt;/FONT&gt;&lt;FONT size=2&gt;.cboSQLServer.Items.Clear();&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#008000 size=2&gt;//-- Start the thread&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;this&lt;/FONT&gt;&lt;FONT size=2&gt;.sqlWorker.RunWorkerAsync();&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;private&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;void&lt;/FONT&gt;&lt;FONT size=2&gt; sqlWorker_DoWork(&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;object&lt;/FONT&gt;&lt;FONT size=2&gt; sender, &lt;/FONT&gt;&lt;FONT color=#2b91af size=2&gt;DoWorkEventArgs&lt;/FONT&gt;&lt;FONT size=2&gt; e)&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#008000 size=2&gt;// Do not access the form's BackgroundWorker reference directly.&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#008000 size=2&gt;// Instead, use the reference provided by the sender parameter.&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#2b91af size=2&gt;BackgroundWorker&lt;/FONT&gt;&lt;FONT size=2&gt; bw = sender &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;as&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#2b91af size=2&gt;BackgroundWorker&lt;/FONT&gt;&lt;FONT size=2&gt;;&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#008000 size=2&gt;// Start the time-consuming operation.&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#008000 size=2&gt;// e.Result = TimeConsumingOperation(bw, arg);&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;this&lt;/FONT&gt;&lt;FONT size=2&gt;.LoadSQLServers(bw, e);&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#008000 size=2&gt;// If the operation was canceled by the user, &lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#008000 size=2&gt;// set the DoWorkEventArgs.Cancel property to true.&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;if&lt;/FONT&gt;&lt;FONT size=2&gt; (bw.CancellationPending)&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;e.Cancel = &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;true&lt;/FONT&gt;&lt;FONT size=2&gt;;&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#808080 size=2&gt;///&lt;/FONT&gt;&lt;FONT color=#008000 size=2&gt; &lt;/FONT&gt;&lt;FONT color=#808080 size=2&gt;&amp;lt;summary&amp;gt;&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#808080 size=2&gt;///&lt;/FONT&gt;&lt;FONT color=#008000 size=2&gt; Loads the available SQL servers into the combo box&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#808080 size=2&gt;///&lt;/FONT&gt;&lt;FONT color=#008000 size=2&gt; &lt;/FONT&gt;&lt;FONT color=#808080 size=2&gt;&amp;lt;/summary&amp;gt;&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#808080 size=2&gt;///&lt;/FONT&gt;&lt;FONT color=#008000 size=2&gt; &lt;/FONT&gt;&lt;FONT color=#808080 size=2&gt;&amp;lt;remarks&amp;gt;&amp;lt;/remarks&amp;gt;&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;private&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;void&lt;/FONT&gt;&lt;FONT size=2&gt; LoadSQLServers(&lt;/FONT&gt;&lt;FONT color=#2b91af size=2&gt;BackgroundWorker&lt;/FONT&gt;&lt;FONT size=2&gt; bw, &lt;/FONT&gt;&lt;FONT color=#2b91af size=2&gt;DoWorkEventArgs&lt;/FONT&gt;&lt;FONT size=2&gt; e)&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#008000 size=2&gt;//-- Show the wait window&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;bw.ReportProgress(1);&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#008000 size=2&gt;//-- Establish Locals&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#2b91af size=2&gt;SQLServerSchema&lt;/FONT&gt;&lt;FONT size=2&gt; loSQL = &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;new&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#2b91af size=2&gt;SQLServerSchema&lt;/FONT&gt;&lt;FONT size=2&gt;();&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#2b91af size=2&gt;ArrayList&lt;/FONT&gt;&lt;FONT size=2&gt; list = &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;new&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#2b91af size=2&gt;ArrayList&lt;/FONT&gt;&lt;FONT size=2&gt;();&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#008000 size=2&gt;//-- Cycle through all available servers&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;foreach&lt;/FONT&gt;&lt;FONT size=2&gt; (&lt;/FONT&gt;&lt;FONT color=#2b91af size=2&gt;SQLServerInfo&lt;/FONT&gt;&lt;FONT size=2&gt; loSQLInfo &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;in&lt;/FONT&gt;&lt;FONT size=2&gt; loSQL.LoadSQLServerList())&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#008000 size=2&gt;//-- Add the item&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;list.Add(loSQLInfo.Name);&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;e.Result = list;&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;private&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;void&lt;/FONT&gt;&lt;FONT size=2&gt; sqlWorker_ProgressChanged(&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;object&lt;/FONT&gt;&lt;FONT size=2&gt; sender, &lt;/FONT&gt;&lt;FONT color=#2b91af size=2&gt;ProgressChangedEventArgs&lt;/FONT&gt;&lt;FONT size=2&gt; e)&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;if&lt;/FONT&gt;&lt;FONT size=2&gt; (e.ProgressPercentage == 1)&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;this&lt;/FONT&gt;&lt;FONT size=2&gt;.opgWindows.Enabled = &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;false&lt;/FONT&gt;&lt;FONT size=2&gt;;&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;this&lt;/FONT&gt;&lt;FONT size=2&gt;.opgSQL.Enabled = &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;false&lt;/FONT&gt;&lt;FONT size=2&gt;;&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;this&lt;/FONT&gt;&lt;FONT size=2&gt;.cmdBack.Enabled = &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;false&lt;/FONT&gt;&lt;FONT size=2&gt;;&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;this&lt;/FONT&gt;&lt;FONT size=2&gt;.cmdNext.Enabled = &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;false&lt;/FONT&gt;&lt;FONT size=2&gt;;&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#008000 size=2&gt;//-- this.cmdCancel.Enabled = false;&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;this&lt;/FONT&gt;&lt;FONT size=2&gt;.myWait&amp;#119;indow.ShowWaitWindow(&lt;/FONT&gt;&lt;FONT color=#2b91af size=2&gt;Localization&lt;/FONT&gt;&lt;FONT size=2&gt;.RetrieveTextValue(&lt;/FONT&gt;&lt;FONT color=#a31515 size=2&gt;"waitWindTxt030"&lt;/FONT&gt;&lt;FONT size=2&gt;), &lt;/FONT&gt;&lt;FONT color=#2b91af size=2&gt;Localization&lt;/FONT&gt;&lt;FONT size=2&gt;.RetrieveTextValue(&lt;/FONT&gt;&lt;FONT color=#a31515 size=2&gt;"waitWindTxt040"&lt;/FONT&gt;&lt;FONT size=2&gt;));&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;private&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;void&lt;/FONT&gt;&lt;FONT size=2&gt; sqlWorker_RunWorkerCompleted(&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;object&lt;/FONT&gt;&lt;FONT size=2&gt; sender, &lt;/FONT&gt;&lt;FONT color=#2b91af size=2&gt;RunWorkerCompletedEventArgs&lt;/FONT&gt;&lt;FONT size=2&gt; e)&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;if&lt;/FONT&gt;&lt;FONT size=2&gt; (e.Cancelled)&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;this&lt;/FONT&gt;&lt;FONT size=2&gt;.myWait&amp;#119;indow.HideWaitWindow();&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#008000 size=2&gt;// The user canceled the operation.&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#2b91af size=2&gt;MessageBox&lt;/FONT&gt;&lt;FONT size=2&gt;.Show(&lt;/FONT&gt;&lt;FONT color=#a31515 size=2&gt;"Operation was canceled"&lt;/FONT&gt;&lt;FONT size=2&gt;);&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;this&lt;/FONT&gt;&lt;FONT size=2&gt;._ServersLoaded = &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;false&lt;/FONT&gt;&lt;FONT size=2&gt;;&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;this&lt;/FONT&gt;&lt;FONT size=2&gt;.opgWindows.Enabled = &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;true&lt;/FONT&gt;&lt;FONT size=2&gt;;&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;this&lt;/FONT&gt;&lt;FONT size=2&gt;.opgSQL.Enabled = &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;true&lt;/FONT&gt;&lt;FONT size=2&gt;;&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;this&lt;/FONT&gt;&lt;FONT size=2&gt;.cmdBack.Enabled = &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;true&lt;/FONT&gt;&lt;FONT size=2&gt;;&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;this&lt;/FONT&gt;&lt;FONT size=2&gt;.cmdNext.Enabled = &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;true&lt;/FONT&gt;&lt;FONT size=2&gt;;&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;this&lt;/FONT&gt;&lt;FONT size=2&gt;.cmdCancel.Enabled = &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;true&lt;/FONT&gt;&lt;FONT size=2&gt;;&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;else&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;if&lt;/FONT&gt;&lt;FONT size=2&gt; (e.Error != &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;null&lt;/FONT&gt;&lt;FONT size=2&gt;)&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#008000 size=2&gt;// There was an error during the operation.&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;string&lt;/FONT&gt;&lt;FONT size=2&gt; msg = &lt;/FONT&gt;&lt;FONT color=#2b91af size=2&gt;String&lt;/FONT&gt;&lt;FONT size=2&gt;.Format(&lt;/FONT&gt;&lt;FONT color=#a31515 size=2&gt;"An error occurred: {0}"&lt;/FONT&gt;&lt;FONT size=2&gt;, e.Error.Message);&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#2b91af size=2&gt;MessageBox&lt;/FONT&gt;&lt;FONT size=2&gt;.Show(msg);&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;else&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#008000 size=2&gt;// The operation completed normally.&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#2b91af size=2&gt;ArrayList&lt;/FONT&gt;&lt;FONT size=2&gt; servers = (&lt;/FONT&gt;&lt;FONT color=#2b91af size=2&gt;ArrayList&lt;/FONT&gt;&lt;FONT size=2&gt;)e.Result;&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;for&lt;/FONT&gt;&lt;FONT size=2&gt; (&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;int&lt;/FONT&gt;&lt;FONT size=2&gt; i = 0; i &amp;lt; servers.Count; i++)&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;this&lt;/FONT&gt;&lt;FONT size=2&gt;.cboSQLServer.Items.Add(servers.ToArray().GetValue(i));&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;if&lt;/FONT&gt;&lt;FONT size=2&gt; (&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;this&lt;/FONT&gt;&lt;FONT size=2&gt;.cboSQLServer.Items.Count &amp;gt; 0)&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#008000 size=2&gt;//-- Select the first item&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;this&lt;/FONT&gt;&lt;FONT size=2&gt;.cboSQLServer.SelectedIndex = 0;&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;this&lt;/FONT&gt;&lt;FONT size=2&gt;.myWait&amp;#119;indow.HideWaitWindow();&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;this&lt;/FONT&gt;&lt;FONT size=2&gt;.opgWindows.Enabled = &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;false&lt;/FONT&gt;&lt;FONT size=2&gt;;&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;this&lt;/FONT&gt;&lt;FONT size=2&gt;.opgSQL.Enabled = &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;false&lt;/FONT&gt;&lt;FONT size=2&gt;;&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;this&lt;/FONT&gt;&lt;FONT size=2&gt;.cmdBack.Enabled = &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;true&lt;/FONT&gt;&lt;FONT size=2&gt;;&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;this&lt;/FONT&gt;&lt;FONT size=2&gt;.cmdNext.Enabled = &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;true&lt;/FONT&gt;&lt;FONT size=2&gt;;&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#008000 size=2&gt;//-- this.cmdCancel.Enabled = true;&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;private&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;void&lt;/FONT&gt;&lt;FONT size=2&gt; cmdCancel_Click(&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;object&lt;/FONT&gt;&lt;FONT size=2&gt; sender, &lt;/FONT&gt;&lt;FONT color=#2b91af size=2&gt;EventArgs&lt;/FONT&gt;&lt;FONT size=2&gt; e)&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;if&lt;/FONT&gt;&lt;FONT size=2&gt; (&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;this&lt;/FONT&gt;&lt;FONT size=2&gt;.sqlWorker.IsBusy)&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#008000 size=2&gt;// Cancel the asynchronous operation.&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;this&lt;/FONT&gt;&lt;FONT size=2&gt;.sqlWorker.CancelAsync();&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;this&lt;/FONT&gt;&lt;FONT size=2&gt;.cmdCancel.Enabled = &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;false&lt;/FONT&gt;&lt;FONT size=2&gt;;&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;else&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;try&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;if&lt;/FONT&gt;&lt;FONT size=2&gt; (_Migrator != &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;null&lt;/FONT&gt;&lt;FONT size=2&gt;)&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;_Migrator.CancelConversionThread();&lt;/P&gt;&lt;P&gt;_Migrator.Dispose();&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;catch&lt;/FONT&gt;&lt;FONT size=2&gt; (&lt;/FONT&gt;&lt;FONT color=#2b91af size=2&gt;Exception&lt;/FONT&gt;&lt;FONT size=2&gt;)&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;throw&lt;/FONT&gt;&lt;FONT size=2&gt;;&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;finally&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;this&lt;/FONT&gt;&lt;FONT size=2&gt;.DialogResult = &lt;/FONT&gt;&lt;FONT color=#2b91af size=2&gt;DialogResult&lt;/FONT&gt;&lt;FONT size=2&gt;.Abort;&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;this&lt;/FONT&gt;&lt;FONT size=2&gt;.Close();&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;/FONT&gt;[/codesnippet]&lt;/P&gt;&lt;P&gt;Maybe you can have a look at it and use it for the framework? OK, you will have to translate it to VB.NET, but this will surely not be a problem for you and this way you can shift my code to a much better one. :)&lt;/P&gt;&lt;P&gt;Friendly greetings,&lt;/P&gt;&lt;P&gt;Ralph</description><pubDate>Fri, 27 Jun 2008 12:11:19 GMT</pubDate><dc:creator>Ralph Rutschmann</dc:creator></item><item><title>RE: SampleDataInstallerClass -&amp;gt; cross-thread error...</title><link>http://forum.strataframe.net/Topic13684-11-1.aspx</link><description>Actually I am using an AMD X2 Dual Core 6400+ ... I will still look into the issue to see if there is something that can be done.  Thanks.</description><pubDate>Tue, 05 Feb 2008 12:38:14 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item><item><title>RE: SampleDataInstallerClass -&amp;gt; cross-thread error...</title><link>http://forum.strataframe.net/Topic13684-11-1.aspx</link><description>Hi Trent,&lt;/P&gt;&lt;P&gt;my machine is equipped with an AMD Athlon 64X2 Dual Core Processor 4200+ / 2,21GHz, 1,00 GB Ram.&lt;/P&gt;&lt;P&gt;Unfortunately I can't run a test against a machine equipped with Intel chipset and processor because I do not have one near around. Are you using Intel without that problem? Then my next machine will surely have Intel on board.&lt;/P&gt;&lt;P&gt;Thank you very much and friendly greetings,&lt;/P&gt;&lt;P&gt;Ralph</description><pubDate>Tue, 05 Feb 2008 12:26:18 GMT</pubDate><dc:creator>Ralph Rutschmann</dc:creator></item><item><title>RE: SampleDataInstallerClass -&amp;gt; cross-thread error...</title><link>http://forum.strataframe.net/Topic13684-11-1.aspx</link><description>[quote]Maybe there is something wrong with my machine?[/quote]&lt;/P&gt;&lt;P&gt;It is funny that you mentioned this....you are getting a cross-thread violation, which we have run into an issue recently where one machine would get the error and not another.  The difference had to do with AMD dual cores and another machine with an Intel HyperThreading procesor.  Strange, but true.  I wonder if there is something along these lines going on here.  I will look to see if there is some other precaution that we could take to aid in preventing this.  Thanks for the info.</description><pubDate>Tue, 05 Feb 2008 10:29:16 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item><item><title>RE: SampleDataInstallerClass -&amp;gt; cross-thread error...</title><link>http://forum.strataframe.net/Topic13684-11-1.aspx</link><description>Hello Trent,&lt;P&gt;&amp;gt; I ran the C# sample that gets installed with the framework (instead of the one from the forum) and did not have any issues.  The one from the forum was ultimately added to the install.  Click Start -&amp;gt; StrataFrame -&amp;gt; Samples -&amp;gt; C# -&amp;gt; Database Installer Sample.  Run this sample to see if you have the same issue. &amp;lt;&lt;/P&gt;&lt;P&gt;Yes, I do. Unfortunately. I did exactly what you described:&lt;/P&gt;&lt;P&gt;I clicked on 'Pre-Build Dialogs', then 'Next' without touching anything else, after that I clicked on the little down arrow at the combobox for selecting an SQL Server.&lt;/P&gt;&lt;P&gt;At this point I get the following error message:&lt;/P&gt;&lt;P&gt; 'System.InvalidOperationException was unhandled by user code&lt;BR&gt;  Message="Ungültiger threadübergreifender Vorgang: Der Zugriff auf das Steuerelement cboSQLServer erfolgte von einem anderen Thread als dem Thread, für den es erstellt wurde."&lt;BR&gt;  Source="System.Windows.Forms"&lt;BR&gt;  StackTrace:&lt;BR&gt;       bei System.Windows.Forms.Control.get_Handle()&lt;BR&gt;       bei System.Windows.Forms.Control.SendMessage(Int32 msg, Int32 wparam, Int32 lparam)&lt;BR&gt;       bei System.Windows.Forms.ComboBox.NativeClear()&lt;BR&gt;       bei System.Windows.Forms.ComboBox.ObjectCollection.ClearInternal()&lt;BR&gt;       bei System.Windows.Forms.ComboBox.ObjectCollection.Clear()&lt;BR&gt;       bei MicroFour.StrataFrame.DBEngine.Deployment.MDDeployMain.LoadSQLServers()&lt;BR&gt;       bei MicroFour.StrataFrame.DBEngine.Deployment.MDDeployMain.sqlWorker_DoWork(Object sender, DoWorkEventArgs e)&lt;BR&gt;       bei System.ComponentModel.BackgroundWorker.OnDoWork(DoWorkEventArgs e)&lt;BR&gt;       bei System.ComponentModel.BackgroundWorker.WorkerThreadStart(Object argument)&lt;/P&gt;&lt;P&gt;Maybe there is something wrong with my machine?&lt;/P&gt;&lt;P&gt;TIA and friendly greetings,&lt;/P&gt;&lt;P&gt;Ralph&lt;/P&gt;&lt;P&gt;&lt;BR&gt; </description><pubDate>Mon, 04 Feb 2008 01:49:45 GMT</pubDate><dc:creator>Ralph Rutschmann</dc:creator></item><item><title>RE: SampleDataInstallerClass -&amp;gt; cross-thread error...</title><link>http://forum.strataframe.net/Topic13684-11-1.aspx</link><description>Ralph,&lt;/P&gt;&lt;P&gt;I ran the C# sample that gets installed with the framework (instead of the one from the forum) and did not have any issues.  The one from the forum was ultimately added to the install.  Click Start -&amp;gt; StrataFrame -&amp;gt; Samples -&amp;gt; C# -&amp;gt; Database Installer Sample.  Run this sample to see if you have the same issue.  I am not having any issues with the sample.  If you are running the installer class (not the standard part of the sample) through an installation, then you have to take this into account if you are executing the install on another thread by creating a delegate or a synchronization object (ISynchronizeInvoke).  But if you are just running the WinForms sample, then I cannot reproduce.  Any additional details would be helpful :)</description><pubDate>Sun, 27 Jan 2008 11:29:39 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item><item><title>RE: SampleDataInstallerClass -&amp;gt; cross-thread error...</title><link>http://forum.strataframe.net/Topic13684-11-1.aspx</link><description>Hi Ben,&lt;/P&gt;&lt;P&gt;"I unpacked the examples to the projects directory and opened the solution with VS2005. Then I corrected the references to my new strataframe components on my machine and started debugging."&lt;/P&gt;&lt;P&gt;I used the CSharpDemos.exe examples from Microfour for StrataFrame - &lt;A href="http://forum.strataframe.net/Topic5397-17-1.aspx"&gt;http://forum.strataframe.net/Topic5397-17-1.aspx&lt;/A&gt; without any changes other than to correct the references. &lt;/P&gt;&lt;P&gt;Can you reproduce the error with the example like it is?&lt;/P&gt;&lt;P&gt;TIA and friendly greetings, Ralph</description><pubDate>Thu, 24 Jan 2008 10:05:54 GMT</pubDate><dc:creator>Ralph Rutschmann</dc:creator></item><item><title>RE: SampleDataInstallerClass -&amp;gt; cross-thread error...</title><link>http://forum.strataframe.net/Topic13684-11-1.aspx</link><description>Could you show the code where you are creating and showing the MDDeployMain form?  &lt;/P&gt;&lt;P&gt;Are you calling .Show() on the form or .ShowDialog() on the form?</description><pubDate>Thu, 24 Jan 2008 08:58:34 GMT</pubDate><dc:creator>Ben Chase</dc:creator></item><item><title>SampleDataInstallerClass -&amp;gt; cross-thread error...</title><link>http://forum.strataframe.net/Topic13684-11-1.aspx</link><description>Hi there,&lt;/P&gt;&lt;P&gt;maybe I'm doing something stupid, but I tried the SampleDataInstallerClass from the Example.zip for C#. I unpacked the examples to the projects directory and opened the solution with VS2005. Then I corrected the references to my new strataframe components on my machine and started debugging.&lt;/P&gt;&lt;P&gt;I tried the Pre-Build Dialogs, but as soon as I click on the combobox to choose the server, I get an exception in MDDeployMain.vb at&lt;/P&gt;&lt;P&gt; '-- Clear the combo&lt;/P&gt;&lt;P&gt;cboSQLServer.Items.Clear()&lt;/P&gt;&lt;P&gt;telling me, there is a cross-thread call exeption.&lt;/P&gt;&lt;P&gt;Therefore I can't choose any server and have to stop debugging.&lt;/P&gt;&lt;P&gt;Any hint?&lt;/P&gt;&lt;P&gt;TIA and friendly greetings, Ralph</description><pubDate>Wed, 23 Jan 2008 10:56:32 GMT</pubDate><dc:creator>Ralph Rutschmann</dc:creator></item></channel></rss>