<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet href="http://feeds.feedburner.com/~d/styles/atom10full.xsl" type="text/xsl" media="screen"?><?xml-stylesheet href="http://feeds.feedburner.com/~d/styles/itemcontent.css" type="text/css" media="screen"?><feed xmlns="http://www.w3.org/2005/Atom" xmlns:openSearch="http://a9.com/-/spec/opensearchrss/1.0/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0"><id>tag:blogger.com,1999:blog-6538953</id><updated>2008-07-17T00:29:27.373+02:00</updated><title type="text">Peter Gfader 's .net Blog</title><link rel="alternate" type="text/html" href="http://peitor.blogspot.com/" /><link rel="next" type="application/atom+xml" href="http://www.blogger.com/feeds/6538953/posts/default?start-index=26&amp;max-results=25" /><link rel="http://schemas.google.com/g/2005#feed" type="application/atom+xml" href="http://peitor.blogspot.com/feeds/posts/default" /><author><name>.peter.gfader.</name><uri>http://www.blogger.com/profile/07780415437484280285</uri><email>noreply@blogger.com</email></author><generator version="7.00" uri="http://www.blogger.com">Blogger</generator><openSearch:totalResults>175</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><link rel="self" href="http://feeds.feedburner.com/PeterGfader" type="application/atom+xml" /><entry><id>tag:blogger.com,1999:blog-6538953.post-2147474073086276825</id><published>2008-07-11T15:48:00.003+02:00</published><updated>2008-07-11T15:56:00.457+02:00</updated><title type="text">Strange behaviour with Local Accessfile as DB with relativ path</title><content type="html">If you are using an AccessFile as DB. &lt;br /&gt;And specify it as relativ path in your app.config file like this&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&amp;lt;add name="MSAccess" connectionString="Provider=Microsoft.Jet.OLEDB.4.0;&lt;br /&gt;Data Source=..\..\AccessFile\LocalAccess.mdb;&lt;br /&gt;User Id=admin;Password=;" providerName="System.Data.OleDb" /&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;If you are using OpenFileDialog or SaveFileDialog &lt;br /&gt;you must ensure to set RestoreDirectory = true&lt;br /&gt;&lt;br /&gt;If you are not doing so, your access-file will not be found after some FileDialog...&lt;br /&gt;&lt;br /&gt;The default value is false. &lt;br /&gt;RestoreDirectory = false on default&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;openFileDialog1.RestoreDirectory = true ;&lt;br /&gt;&lt;/pre&gt;</content><link rel="alternate" type="text/html" href="http://feeds.feedburner.com/~r/PeterGfader/~3/332704683/strange-behaviour-with-local-accessfile.html" title="Strange behaviour with Local Accessfile as DB with relativ path" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=6538953&amp;postID=2147474073086276825" title="0 Comments" /><link rel="replies" type="application/atom+xml" href="http://peitor.blogspot.com/feeds/2147474073086276825/comments/default" title="Post Comments" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6538953/posts/default/2147474073086276825" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6538953/posts/default/2147474073086276825" /><author><name>.peter.gfader.</name><uri>http://www.blogger.com/profile/07780415437484280285</uri><email>noreply@blogger.com</email></author><feedburner:origLink>http://peitor.blogspot.com/2008/07/strange-behaviour-with-local-accessfile.html</feedburner:origLink></entry><entry><id>tag:blogger.com,1999:blog-6538953.post-6048102056631986838</id><published>2008-07-08T10:02:00.003+02:00</published><updated>2008-07-08T10:39:10.042+02:00</updated><title type="text">Data driven unit tests with Filenames from a directory!</title><content type="html">&lt;span style="font-weight:bold;"&gt;Idea for simple data-driven-unit-tests:&lt;/span&gt;&lt;br /&gt;Create 2 folders in your solution&lt;br /&gt;/valid-test-files/&lt;br /&gt;/invalid-test-files/&lt;br /&gt;&lt;br /&gt;copy in those folders your single files to test.&lt;br /&gt;execute unit test with these files...&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;but how???&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;there is no dataprovider (DataSource) for directories (not in vs2005, in vs2008 im not sure)&lt;br /&gt;&lt;br /&gt;i did it this way.&lt;br /&gt;create in each folder a text file.&lt;br /&gt;/valid-test-files/data.txt&lt;br /&gt;/invalid-test-files/data.txt&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;these text files will contain a directory listing with the single files!&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;add to your unit test&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;[DeploymentItem(@"invalid-test-files\data.txt", @"invalid")]&lt;br /&gt;[DataSource("System.Data.OleDb", @"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=.\invalid-test-files;Extended Properties='text;FMT=Delimited'", @"data.txt", DataAccessMethod.Sequential)]&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;now you will get in your unit test the single files&lt;br /&gt;&lt;pre&gt;string fileName = TestContext.DataRow[0].ToString();&lt;/pre&gt;&lt;br /&gt;        &lt;br /&gt;&lt;br /&gt;but how to fill the files data.txt?&lt;br /&gt;use this method in Assembly Initialization&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;        [AssemblyInitialize]&lt;br /&gt;        public static void CreateOutputDataTxtFiles(TestContext context)&lt;br /&gt;        {&lt;br /&gt;            &lt;br /&gt;            string startDir = Path.Combine(Path.GetDirectoryName(Path.GetDirectoryName(context.TestDir)), @"Siag.XXX.BusinessLogic.Test");&lt;br /&gt;            string addDir = @"valid-test-files";&lt;br /&gt;&lt;br /&gt;            WriteFilePathsToData(Path.Combine(startDir, addDir), "*.dat");&lt;br /&gt;&lt;br /&gt;            addDir = @"invalid-test-files";&lt;br /&gt;&lt;br /&gt;            WriteFilePathsToData(Path.Combine(startDir, addDir), "*.dat");&lt;br /&gt;&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;        private static void WriteFilePathsToData(string startDir, string searchPattern)&lt;br /&gt;        {&lt;br /&gt;            StringBuilder result = new StringBuilder();&lt;br /&gt;&lt;br /&gt;            foreach (string fileName in Directory.GetFiles(startDir, searchPattern))&lt;br /&gt;            {&lt;br /&gt;                result.AppendLine(fileName);&lt;br /&gt;            }&lt;br /&gt;&lt;br /&gt;            // add additional directories here&lt;br /&gt;&lt;br /&gt;            string fileNameData = Path.Combine(startDir, @"data.txt");&lt;br /&gt;&lt;br /&gt;            File.SetAttributes(fileNameData, FileAttributes.Normal);&lt;br /&gt;            File.WriteAllText(fileNameData, result.ToString());&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;</content><link rel="alternate" type="text/html" href="http://feeds.feedburner.com/~r/PeterGfader/~3/329775954/data-driven-unit-tests-with-filenames.html" title="Data driven unit tests with Filenames from a directory!" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=6538953&amp;postID=6048102056631986838" title="0 Comments" /><link rel="replies" type="application/atom+xml" href="http://peitor.blogspot.com/feeds/6048102056631986838/comments/default" title="Post Comments" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6538953/posts/default/6048102056631986838" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6538953/posts/default/6048102056631986838" /><author><name>.peter.gfader.</name><uri>http://www.blogger.com/profile/07780415437484280285</uri><email>noreply@blogger.com</email></author><feedburner:origLink>http://peitor.blogspot.com/2008/07/data-driven-unit-tests-with-filenames.html</feedburner:origLink></entry><entry><id>tag:blogger.com,1999:blog-6538953.post-3024770505890655736</id><published>2008-06-13T16:07:00.002+02:00</published><updated>2008-06-13T16:14:40.790+02:00</updated><title type="text">Create pdfs from within .net c#</title><content type="html">pdflib vs. reportviewer&lt;br /&gt;&lt;br /&gt;advantages +&lt;br /&gt;disadvantages -&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;pdflib &lt;br /&gt;+ create pdfs with attachments&lt;br /&gt;- mail merge (blocks) difficult to handle&lt;br /&gt;  (adobe plugin not working, ...)&lt;br /&gt;- bad sourcecode (coding style of pdflib)&lt;br /&gt;- operates on strings not with exceptions...&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;reportviewer&lt;br /&gt;+ easy layout&lt;br /&gt;+ export not only in pdf (html, csv, xls,...)&lt;br /&gt;- no dedicated pdf creation (only export report)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;TO validate:&lt;br /&gt;iText.NET &lt;br /&gt;&lt;a href="http://www.ujihara.jp/iTextdotNET/en/"&gt;iText.NET is a Free PDF Library for .NET Framework&lt;/a&gt;&lt;br /&gt;ported from java</content><link rel="alternate" type="text/html" href="http://feeds.feedburner.com/~r/PeterGfader/~3/311363039/create-pdfs-from-within-net-c.html" title="Create pdfs from within .net c#" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=6538953&amp;postID=3024770505890655736" title="0 Comments" /><link rel="replies" type="application/atom+xml" href="http://peitor.blogspot.com/feeds/3024770505890655736/comments/default" title="Post Comments" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6538953/posts/default/3024770505890655736" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6538953/posts/default/3024770505890655736" /><author><name>.peter.gfader.</name><uri>http://www.blogger.com/profile/07780415437484280285</uri><email>noreply@blogger.com</email></author><feedburner:origLink>http://peitor.blogspot.com/2008/06/create-pdfs-from-within-net-c.html</feedburner:origLink></entry><entry><id>tag:blogger.com,1999:blog-6538953.post-3969345866497939992</id><published>2008-06-03T09:52:00.000+02:00</published><updated>2008-06-03T09:52:42.266+02:00</updated><title type="text">NEUINSTALLATION Visual Studio - Link Tip</title><content type="html">&lt;a href="http://geekswithblogs.net/brians/archive/2008/05/12/122087.aspx"&gt;&amp;quot;Pimp My IDE&amp;quot;: 101 Visual Studio tips, tricks, and add-ins&lt;/a&gt;</content><link rel="alternate" type="text/html" href="http://feeds.feedburner.com/~r/PeterGfader/~3/305350839/neuinstallation-visual-studio-link-tip.html" title="NEUINSTALLATION Visual Studio - Link Tip" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=6538953&amp;postID=3969345866497939992" title="0 Comments" /><link rel="replies" type="application/atom+xml" href="http://peitor.blogspot.com/feeds/3969345866497939992/comments/default" title="Post Comments" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6538953/posts/default/3969345866497939992" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6538953/posts/default/3969345866497939992" /><author><name>.peter.gfader.</name><uri>http://www.blogger.com/profile/07780415437484280285</uri><email>noreply@blogger.com</email></author><feedburner:origLink>http://peitor.blogspot.com/2008/06/neuinstallation-visual-studio-link-tip.html</feedburner:origLink></entry><entry><id>tag:blogger.com,1999:blog-6538953.post-7641450716785797896</id><published>2008-05-30T19:15:00.003+02:00</published><updated>2008-05-30T19:20:04.703+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="code snippet. ms access" /><category scheme="http://www.blogger.com/atom/ns#" term="tip" /><category scheme="http://www.blogger.com/atom/ns#" term="mdb" /><title type="text">Exception: Operation must be an updatable query when you use an local Access File (.mdb)</title><content type="html">SOLUTION&lt;br /&gt;The Access File .mdb is readyonly, from sourcecontrol&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;this problem is resolved by Helper: RemoveReadOnlyFlagAccessFile()&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Code Snippet to remove ReadOnly&lt;br /&gt;&lt;span style="font-size:78%;"&gt;&lt;span style="font-family: courier new;"&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;        public static string RemoveReadOnlyFlagAccessFile()&lt;br /&gt;        {&lt;br /&gt;            string returnValue = "";&lt;br /&gt;&lt;br /&gt;            string connString = GetAccessConnectionString();&lt;br /&gt;            if (string.IsNullOrEmpty(connString))&lt;br /&gt;            {&lt;br /&gt;                returnValue = "ConnectionString not found";&lt;br /&gt;            }&lt;br /&gt;            else&lt;br /&gt;            {&lt;br /&gt;                //FORMAT&lt;br /&gt;                //connectionString="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=..\..\AccessFile\oracle-reverse-engineered-modified-manually.mdb;User Id=admin;Password=;"&lt;br /&gt;                if (connString.ToUpper().Contains("OLEDB") == false)&lt;br /&gt;                {&lt;br /&gt;                    returnValue = "ConnectionString is not for MsAccess. doesnt contain OLEDB. ConnString: " + connString;&lt;br /&gt;                }&lt;br /&gt;                else&lt;br /&gt;                {&lt;br /&gt;                    int indexStart = connString.IndexOf("Data Source=");&lt;br /&gt;                    if (indexStart &lt;= 0)&lt;br /&gt;                    {&lt;br /&gt;                        returnValue = "ConnectionString is not correct. doesnt contain Data Source=. ConnString: " + connString;&lt;br /&gt;                    }&lt;br /&gt;                    else&lt;br /&gt;                    {&lt;br /&gt;&lt;br /&gt;                        string tempString = connString.Substring(indexStart + 12);&lt;br /&gt;                        int indexEnd = tempString.IndexOf(".mdb");&lt;br /&gt;                        if (indexEnd &lt;= 0)&lt;br /&gt;                        {&lt;br /&gt;                            returnValue = "ConnectionString is not correct. doesnt contain .mdb. TempConnString" + tempString;&lt;br /&gt;                        }&lt;br /&gt;                        else&lt;br /&gt;                        {&lt;br /&gt;                            string filePath = tempString.Substring(0, indexEnd + 4);&lt;br /&gt;                            string fullPath = Path.GetFullPath(filePath);&lt;br /&gt;&lt;br /&gt;                            if (File.Exists(fullPath) == false)&lt;br /&gt;                            {&lt;br /&gt;                                returnValue = "File doesnt exist: " + fullPath;&lt;br /&gt;                            }&lt;br /&gt;                            else&lt;br /&gt;                            {&lt;br /&gt;                                returnValue = "File " + fullPath + " is: " + File.GetAttributes(fullPath).ToString() + "\n";&lt;br /&gt;&lt;br /&gt;                                try&lt;br /&gt;                                {&lt;br /&gt;                                    File.SetAttributes(fullPath, FileAttributes.Normal);&lt;br /&gt;                                    returnValue += "File " + fullPath + " NOW is: " + File.GetAttributes(fullPath).ToString() + "\n";&lt;br /&gt;                                }&lt;br /&gt;                                catch (Exception ex)&lt;br /&gt;                                {&lt;br /&gt;                                    Logger.Write("EXCEPTION in File.SetAttributes:   " + ex.ToString());&lt;br /&gt;                                    returnValue += "Exception on File.SetAttributes";&lt;br /&gt;                                }&lt;br /&gt;                                &lt;br /&gt;                            }&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;                        }&lt;br /&gt;                    }&lt;br /&gt;                }&lt;br /&gt;            }&lt;br /&gt;&lt;br /&gt;            //Logger.Write("FileUtils.RemoveReadOnlyFlagAccessFile  returnValue: \n" + returnValue);&lt;br /&gt;            return returnValue;&lt;br /&gt;&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;        private static string GetAccessConnectionString()&lt;br /&gt;        {&lt;br /&gt;            &lt;br /&gt;&lt;br /&gt;            if (System.Configuration.ConfigurationManager.ConnectionStrings.Count == 0)&lt;br /&gt;            {&lt;br /&gt;                throw new ApplicationException("Set ConnectionString in .config file!");&lt;br /&gt;            }&lt;br /&gt;            if (System.Configuration.ConfigurationManager.ConnectionStrings.Count == 1)&lt;br /&gt;            {&lt;br /&gt;                return System.Configuration.ConfigurationManager.ConnectionStrings[0].ConnectionString;&lt;br /&gt;            }&lt;br /&gt;            else&lt;br /&gt;            {&lt;br /&gt;                // try "MasterMSAccess", then empty, then firstone&lt;br /&gt;                if (System.Configuration.ConfigurationManager.ConnectionStrings["MasterMSAccess"] != null)&lt;br /&gt;                {&lt;br /&gt;                    return System.Configuration.ConfigurationManager.ConnectionStrings["MasterMSAccess"].ConnectionString;&lt;br /&gt;                }&lt;br /&gt;                else if (System.Configuration.ConfigurationManager.ConnectionStrings[""] != null)&lt;br /&gt;                {&lt;br /&gt;                    return System.Configuration.ConfigurationManager.ConnectionStrings[""].ConnectionString;&lt;br /&gt;                }&lt;br /&gt;                else&lt;br /&gt;                {&lt;br /&gt;                    return System.Configuration.ConfigurationManager.ConnectionStrings[0].ConnectionString;&lt;br /&gt;                }&lt;br /&gt;&lt;br /&gt;            }&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;/span&gt;&lt;/span&gt;</content><link rel="alternate" type="text/html" href="http://feeds.feedburner.com/~r/PeterGfader/~3/301392271/exception-operation-must-be-updatable.html" title="Exception: Operation must be an updatable query when you use an local Access File (.mdb)" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=6538953&amp;postID=7641450716785797896" title="0 Comments" /><link rel="replies" type="application/atom+xml" href="http://peitor.blogspot.com/feeds/7641450716785797896/comments/default" title="Post Comments" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6538953/posts/default/7641450716785797896" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6538953/posts/default/7641450716785797896" /><author><name>.peter.gfader.</name><uri>http://www.blogger.com/profile/07780415437484280285</uri><email>noreply@blogger.com</email></author><feedburner:origLink>http://peitor.blogspot.com/2008/05/exception-operation-must-be-updatable.html</feedburner:origLink></entry><entry><id>tag:blogger.com,1999:blog-6538953.post-6737472137991341808</id><published>2008-05-30T10:27:00.000+02:00</published><updated>2008-05-30T10:27:58.178+02:00</updated><title type="text">Application.Exit vs. Environment.Exit</title><content type="html">Essence of the blog post!&lt;br /&gt;&lt;code&gt;&lt;br /&gt;if (System.Windows.Forms.Application.MessageLoop)&lt;br /&gt;{&lt;br /&gt; // Use this since we are a WinForms app&lt;br /&gt; System.Windows.Forms.Application.Exit();&lt;br /&gt;}&lt;br /&gt;else&lt;br /&gt;{&lt;br /&gt; // Use this since we are a console app&lt;br /&gt; System.Environment.Exit(1);&lt;br /&gt;}&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://geekswithblogs.net/mtreadwell/archive/2004/06/06/6123.aspx"&gt;Application.Exit vs. Environment.Exit&lt;/a&gt;</content><link rel="alternate" type="text/html" href="http://feeds.feedburner.com/~r/PeterGfader/~3/301138903/applicationexit-vs-environmentexit.html" title="Application.Exit vs. Environment.Exit" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=6538953&amp;postID=6737472137991341808" title="0 Comments" /><link rel="replies" type="application/atom+xml" href="http://peitor.blogspot.com/feeds/6737472137991341808/comments/default" title="Post Comments" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6538953/posts/default/6737472137991341808" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6538953/posts/default/6737472137991341808" /><author><name>.peter.gfader.</name><uri>http://www.blogger.com/profile/07780415437484280285</uri><email>noreply@blogger.com</email></author><feedburner:origLink>http://peitor.blogspot.com/2008/05/applicationexit-vs-environmentexit.html</feedburner:origLink></entry><entry><id>tag:blogger.com,1999:blog-6538953.post-2490541139299109586</id><published>2008-05-28T14:52:00.001+02:00</published><updated>2008-05-28T14:55:25.881+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="visual studio 2005" /><category scheme="http://www.blogger.com/atom/ns#" term="debugging" /><title type="text">TIP: The symbol file im.pdb does not match the module</title><content type="html">If you encounter&lt;br /&gt;"The symbol file pdb does not match the module"&lt;br /&gt;&lt;br /&gt;Try to look in&lt;br /&gt;Debug -&gt; Windows -&gt; Modules&lt;br /&gt;Ctrl-D, M&lt;br /&gt;&lt;br /&gt;there you can see where vs2008 tries to load the .pdb file.&lt;br /&gt;&lt;br /&gt;SOLUTION&lt;br /&gt;Rebuild your dll in DebugMode and deploy it there!&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=2875265&amp;amp;SiteID=1"&gt;The symbol file im.pdb does not match the module - MSDN Forums&lt;/a&gt;</content><link rel="alternate" type="text/html" href="http://feeds.feedburner.com/~r/PeterGfader/~3/299838773/tip-symbol-file-impdb-does-not-match.html" title="TIP: The symbol file im.pdb does not match the module" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=6538953&amp;postID=2490541139299109586" title="0 Comments" /><link rel="replies" type="application/atom+xml" href="http://peitor.blogspot.com/feeds/2490541139299109586/comments/default" title="Post Comments" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6538953/posts/default/2490541139299109586" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6538953/posts/default/2490541139299109586" /><author><name>.peter.gfader.</name><uri>http://www.blogger.com/profile/07780415437484280285</uri><email>noreply@blogger.com</email></author><feedburner:origLink>http://peitor.blogspot.com/2008/05/tip-symbol-file-impdb-does-not-match.html</feedburner:origLink></entry><entry><id>tag:blogger.com,1999:blog-6538953.post-6478039036921627245</id><published>2008-05-27T10:24:00.003+02:00</published><updated>2008-05-27T10:31:52.674+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Vs2008" /><category scheme="http://www.blogger.com/atom/ns#" term="unit tests" /><category scheme="http://www.blogger.com/atom/ns#" term="Vs2005" /><title type="text">Problems!!  Unit testing with Visual Studio 2008</title><content type="html">#1&lt;br /&gt;with this hack i solved some problems&lt;br /&gt;&lt;code&gt;&lt;br /&gt;        [ClassInitialize]&lt;br /&gt;        public static void ClassInitialize(TestContext testContext)&lt;br /&gt;        {&lt;br /&gt;            AppDomain.CurrentDomain.SetData("APPBASE", Environment.CurrentDirectory);&lt;br /&gt;            Console.WriteLine("DEBUG: " + AppDomain.CurrentDomain.BaseDirectory);&lt;br /&gt;        }&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;BUT with our Base.dll i got an Exception dll not found!&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;SOLUTION&lt;/span&gt;&lt;br /&gt;I must copy our Base.dll to c:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\&lt;br /&gt;&lt;br /&gt;then it works!&lt;br /&gt;not NICE&lt;br /&gt;&lt;br /&gt;#2&lt;br /&gt;to find all configured sections, usersettings, agents-dlls i need my app.config resp. my web.config but&lt;br /&gt;the App.config works with VS2008 with VS2005 not.&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;SOLUTION&lt;/span&gt;&lt;br /&gt;in VS2005 i must add the VSTestHost.exe.config then it works.&lt;br /&gt;&lt;br /&gt;or maybe it works even with App.config&lt;br /&gt;&lt;br /&gt;TO TEST!&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;#3&lt;br /&gt;at last i get my solution always checked out when i run my unit test.&lt;br /&gt;the vs2008 does add the vsmdi file as Solution Item.&lt;br /&gt;&lt;br /&gt;how can i disable this?&lt;br /&gt;&lt;br /&gt;A post that helped at first time.&lt;br /&gt;But Next time it gets checked out.&lt;br /&gt;&lt;a href="http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=499083&amp;SiteID=1"&gt;http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=499083&amp;SiteID=1&lt;/a&gt;</content><link rel="alternate" type="text/html" href="http://feeds.feedburner.com/~r/PeterGfader/~3/299458014/problems-unit-testing-with-visual.html" title="Problems!!  Unit testing with Visual Studio 2008" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=6538953&amp;postID=6478039036921627245" title="0 Comments" /><link rel="replies" type="application/atom+xml" href="http://peitor.blogspot.com/feeds/6478039036921627245/comments/default" title="Post Comments" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6538953/posts/default/6478039036921627245" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6538953/posts/default/6478039036921627245" /><author><name>.peter.gfader.</name><uri>http://www.blogger.com/profile/07780415437484280285</uri><email>noreply@blogger.com</email></author><feedburner:origLink>http://peitor.blogspot.com/2008/05/problems-unit-testing-with-visual.html</feedburner:origLink></entry><entry><id>tag:blogger.com,1999:blog-6538953.post-1944467778499598260</id><published>2008-05-19T15:17:00.003+02:00</published><updated>2008-05-19T15:26:23.673+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="datagridview" /><category scheme="http://www.blogger.com/atom/ns#" term="combobox" /><category scheme="http://www.blogger.com/atom/ns#" term="filter" /><category scheme="http://www.blogger.com/atom/ns#" term="winforms" /><category scheme="http://www.blogger.com/atom/ns#" term="datasource" /><category scheme="http://www.blogger.com/atom/ns#" term="bindingsource" /><title type="text">DataGridView daily problems...</title><content type="html">i have a DataGridview with some ComboBox cells in there.&lt;br /&gt;&lt;br /&gt;each row should have a different list of items to select the value from.&lt;br /&gt;&lt;br /&gt;you can set the bindingsource on Enter and reset the bindingsource to the list with all items on EndEdit...&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;in dataGridView CellEnter&lt;br /&gt;&lt;code&gt;&lt;br /&gt;if (e.ColumnIndex == CELLINDEXWhereComboBoxIs)&lt;br /&gt;{&lt;br /&gt;  //Set DataSource of cell if comboBoxCell&lt;br /&gt;   DataGridViewComboBoxCell cell = (DataGridViewComboBoxCell)dataGridView[e.ColumnIndex, e.RowIndex];&lt;br /&gt;   cell.DataSource = bindingSourceFiltered;&lt;br /&gt;}&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;in dataGridView CellEndEdit&lt;br /&gt;&lt;code&gt;&lt;br /&gt;if (e.ColumnIndex == CELLINDEXWhereComboBoxIs)&lt;br /&gt;{&lt;br /&gt;   //set DataSource to BindingSource with all items&lt;br /&gt;     DataGridViewComboBoxCell cell =   (DataGridViewComboBoxCell)dataGridView[e.ColumnIndex, e.RowIndex];&lt;br /&gt;   cell.DataSource = bindingSourceAll;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;ps:&lt;br /&gt;you can add filters to the bindingsource!&lt;br /&gt;but only if the underlying list supports filtering!!</content><link rel="alternate" type="text/html" href="http://feeds.feedburner.com/~r/PeterGfader/~3/294033089/datagridview-daily-problems.html" title="DataGridView daily problems..." /><link rel="related" href="http://www.devolutions.net/articles/DataGridViewFAQ.htm" title="DataGridView daily problems..." /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=6538953&amp;postID=1944467778499598260" title="2 Comments" /><link rel="replies" type="application/atom+xml" href="http://peitor.blogspot.com/feeds/1944467778499598260/comments/default" title="Post Comments" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6538953/posts/default/1944467778499598260" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6538953/posts/default/1944467778499598260" /><author><name>.peter.gfader.</name><uri>http://www.blogger.com/profile/07780415437484280285</uri><email>noreply@blogger.com</email></author><feedburner:origLink>http://peitor.blogspot.com/2008/05/datagridview-daily-problems.html</feedburner:origLink></entry><entry><id>tag:blogger.com,1999:blog-6538953.post-6859041087137344294</id><published>2008-04-15T08:28:00.003+02:00</published><updated>2008-04-15T09:22:06.935+02:00</updated><title type="text">Data driven unit tests with Text Files!!</title><content type="html">i wanted to do unit tests with a text file as input&lt;br /&gt;1 line contains: entity serialized as string, entityName and other parameter&lt;br /&gt;&lt;br /&gt;e.g.&lt;br /&gt;&lt;code&gt;1|12|123123,123123,143123|54| Riga1_GPS true&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;line is delimited by tab &lt;br /&gt;&lt;br /&gt;#1&lt;br /&gt;create file in your test project&lt;br /&gt;righevalid.txt&lt;br /&gt;File Properties: --&gt; Copy to Output Directory --&gt; copy always&lt;br /&gt;&lt;br /&gt;#2 &lt;br /&gt;create file in your test project&lt;br /&gt;schema.ini&lt;br /&gt;File Properties: --&gt; Copy to Output Directory --&gt; copy always&lt;br /&gt;&lt;br /&gt;#3 &lt;br /&gt;content of schema.ini&lt;br /&gt;&lt;code&gt;[righevalid.txt]&lt;br /&gt;Format=TabDelimited&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;#4&lt;br /&gt;create testmethod&lt;br /&gt;&lt;br /&gt;#5&lt;br /&gt;add following attributes to testmethod&lt;br /&gt;&lt;code&gt;        [TestMethod()]&lt;br /&gt;        [DeploymentItem(@"righevalid.txt")]&lt;br /&gt;        [DeploymentItem(@"schema.ini")]&lt;br /&gt;        [DataSource("System.Data.OleDb", @"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=.;Extended Properties='text;FMT=TabDelimited;HDR=YES'", @"righevalid.txt", DataAccessMethod.Sequential)]&lt;br /&gt;        public void LoadValidRigaTest()&lt;br /&gt;        {&lt;br /&gt;        }&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Note&lt;/span&gt;&lt;br /&gt;DeploymentItem copies files to Test Run Directory&lt;br /&gt;&lt;br /&gt;DataSource is a special OleDb Usage with txt Files&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;#6&lt;br /&gt;use TestContext.DataRow[index] to access your single columns (line) of the text file&lt;br /&gt;TestContext.DataRow[0] = col1  and so on&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;#7&lt;br /&gt;Run Test&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;#8&lt;br /&gt;see output Passed or Failed&lt;br /&gt;Doubleclick Result you can see the result of the single lines!&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;GREAT!&lt;/span&gt;</content><link rel="alternate" type="text/html" href="http://feeds.feedburner.com/~r/PeterGfader/~3/271010310/data-driven-unit-tests-with-text-files.html" title="Data driven unit tests with Text Files!!" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=6538953&amp;postID=6859041087137344294" title="0 Comments" /><link rel="replies" type="application/atom+xml" href="http://peitor.blogspot.com/feeds/6859041087137344294/comments/default" title="Post Comments" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6538953/posts/default/6859041087137344294" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6538953/posts/default/6859041087137344294" /><author><name>.peter.gfader.</name><uri>http://www.blogger.com/profile/07780415437484280285</uri><email>noreply@blogger.com</email></author><feedburner:origLink>http://peitor.blogspot.com/2008/04/data-driven-unit-tests-with-text-files.html</feedburner:origLink></entry><entry><id>tag:blogger.com,1999:blog-6538953.post-6815052452854154534</id><published>2008-02-13T14:08:00.004+01:00</published><updated>2008-04-15T09:22:40.020+02:00</updated><title type="text">TinyMce with webeditor Control IN ACTION</title><content type="html">Control hosted in Winforms Application:&lt;br /&gt;&lt;a href="http://bp3.blogger.com/_7U9eu-U3X-8/R7Lr8h8pNbI/AAAAAAAAA98/R7hSbDP6tmM/s1600-h/seca-webeditor-tinymce-view.gif"&gt;&lt;img style="cursor:pointer; cursor:hand;" src="http://bp3.blogger.com/_7U9eu-U3X-8/R7Lr8h8pNbI/AAAAAAAAA98/R7hSbDP6tmM/s400/seca-webeditor-tinymce-view.gif" border="0" alt=""id="BLOGGER_PHOTO_ID_5166451147684787634" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Control in Editmode - new Form ShowDialog&lt;br /&gt;&lt;a href="http://bp1.blogger.com/_7U9eu-U3X-8/R7LsCB8pNcI/AAAAAAAAA-E/0PfcjC8vllQ/s1600-h/seca-webeditor-tinymce-edit.gif"&gt;&lt;img style="cursor:pointer; cursor:hand;" src="http://bp1.blogger.com/_7U9eu-U3X-8/R7LsCB8pNcI/AAAAAAAAA-E/0PfcjC8vllQ/s400/seca-webeditor-tinymce-edit.gif" border="0" alt=""id="BLOGGER_PHOTO_ID_5166451242174068162" /&gt;&lt;/a&gt;</content><link rel="alternate" type="text/html" href="http://feeds.feedburner.com/~r/PeterGfader/~3/234661757/tinymce-with-webeditor-control-in.html" title="TinyMce with webeditor Control IN ACTION" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=6538953&amp;postID=6815052452854154534" title="0 Comments" /><link rel="replies" type="application/atom+xml" href="http://peitor.blogspot.com/feeds/6815052452854154534/comments/default" title="Post Comments" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6538953/posts/default/6815052452854154534" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6538953/posts/default/6815052452854154534" /><author><name>.peter.gfader.</name><uri>http://www.blogger.com/profile/07780415437484280285</uri><email>noreply@blogger.com</email></author><feedburner:origLink>http://peitor.blogspot.com/2008/02/tinymce-with-webeditor-control-in.html</feedburner:origLink></entry><entry><id>tag:blogger.com,1999:blog-6538953.post-7184244857274340301</id><published>2008-02-08T14:23:00.000+01:00</published><updated>2008-02-08T14:23:47.656+01:00</updated><title type="text">Transactions with MSAccess mdb File</title><content type="html">If you use Distributed Transactions within your Application and an Access .mdb a DataContainer then you maybe did get this:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;System.InvalidOperationException: The ITransactionLocal interface is not supported by the 'Microsoft.Jet.OLEDB.4.0' provider.  Local transactions are unavailable with the current provider.&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;SOLUTION:&lt;br /&gt;Don't let Access participate in this Distributed Transaction&lt;br /&gt;&lt;strong&gt;System.Transactions.TransactionScopeOption.Suppress&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Msdn Link:&lt;br /&gt;&lt;a href="http://msdn2.microsoft.com/en-us/library/3tfwehz6.aspx"&gt;Supporting Transactions in OLE DB&lt;/a&gt;</content><link rel="alternate" type="text/html" href="http://feeds.feedburner.com/~r/PeterGfader/~3/231625659/transactions-with-msaccess-mdb-file.html" title="Transactions with MSAccess mdb File" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=6538953&amp;postID=7184244857274340301" title="0 Comments" /><link rel="replies" type="application/atom+xml" href="http://peitor.blogspot.com/feeds/7184244857274340301/comments/default" title="Post Comments" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6538953/posts/default/7184244857274340301" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6538953/posts/default/7184244857274340301" /><author><name>.peter.gfader.</name><uri>http://www.blogger.com/profile/07780415437484280285</uri><email>noreply@blogger.com</email></author><feedburner:origLink>http://peitor.blogspot.com/2008/02/transactions-with-msaccess-mdb-file.html</feedburner:origLink></entry><entry><id>tag:blogger.com,1999:blog-6538953.post-530966548413708077</id><published>2008-02-01T14:29:00.000+01:00</published><updated>2008-02-01T14:36:18.101+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Entreprise Library" /><category scheme="http://www.blogger.com/atom/ns#" term="Exception Handling Policies" /><title type="text">Entreprise Library:  Exception Handling Policies</title><content type="html">wir sind gerade bei der migration von Microsoft Oracle Client nach Oracle Data Provider.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;WICHTIG in app.config&lt;br /&gt;wenn man bei 2 exceptionTypes einfügt, greifen diese Regeln nicht!&lt;br /&gt;&lt;br /&gt;weiss nicht wieso.&lt;br /&gt;aber mit nur einer funzts.&lt;br /&gt;wenn beide exceptionTypes drin sind, werden diese nicht abgehandlet.&lt;br /&gt;&lt;br /&gt;KOMISCH&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;  &amp;ltexceptionHandling&amp;gt;&lt;br /&gt;    &amp;ltexceptionPolicies&amp;gt;&lt;br /&gt;      &amp;ltadd name=&amp;quot;Global Policy&amp;quot;&amp;gt;&lt;br /&gt;        &amp;ltexceptionTypes&amp;gt;&lt;br /&gt;          &amp;ltadd type=&amp;quot;System.Exception, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089&amp;quot; postHandlingAction=&amp;quot;NotifyRethrow&amp;quot; name=&amp;quot;Exception&amp;quot; /&amp;gt;&lt;br /&gt;        &amp;lt/exceptionTypes&amp;gt;&lt;br /&gt;      &amp;lt/add&amp;gt;&lt;br /&gt;      &amp;ltadd name=&amp;quot;DataAccess&amp;quot;&amp;gt;&lt;br /&gt;        &amp;ltexceptionTypes&amp;gt;&lt;br /&gt;          &amp;ltadd type=&amp;quot;Oracle.DataAccess.Client.OracleException, Oracle.DataAccess, Version=1.102.3.0, Culture=neutral, PublicKeyToken=89b483f429c47342&amp;quot; postHandlingAction=&amp;quot;ThrowNewException&amp;quot; name=&amp;quot;OracleException&amp;quot;&amp;gt;&lt;br /&gt;            &amp;ltexceptionHandlers&amp;gt;&lt;br /&gt;              &amp;ltadd type=&amp;quot;Siag.DataAccess.ExceptionHandler.OracleODPExceptionHandler, Siag.DataAccess&amp;quot; name=&amp;quot;Custom Handler&amp;quot; /&amp;gt;&lt;br /&gt;            &amp;lt/exceptionHandlers&amp;gt;&lt;br /&gt;          &amp;lt/add&amp;gt;&lt;br /&gt;    &lt;br /&gt;     &amp;lt!-- &amp;ltadd type=&amp;quot;System.Data.OracleClient.OracleException, System.Data.OracleClient, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089&amp;quot; postHandlingAction=&amp;quot;ThrowNewException&amp;quot; name=&amp;quot;OracleException&amp;quot;&amp;gt;&lt;br /&gt;            &amp;ltexceptionHandlers&amp;gt;&lt;br /&gt;              &amp;ltadd type=&amp;quot;Siag.DataAccess.ExceptionHandler.OracleExceptionHandler, Siag.DataAccess, Version=2.0.0.11969, Culture=neutral, PublicKeyToken=null&amp;quot; name=&amp;quot;Custom Handler&amp;quot;/&amp;gt;&lt;br /&gt;            &amp;lt/exceptionHandlers&amp;gt;&lt;br /&gt;          &amp;lt/add&amp;gt;&lt;br /&gt;          --&amp;gt;&lt;br /&gt;&lt;br /&gt;        &amp;lt/exceptionTypes&amp;gt;&lt;br /&gt;      &amp;lt/add&amp;gt;&lt;br /&gt;    &amp;lt/exceptionPolicies&amp;gt;&lt;br /&gt;  &amp;lt/exceptionHandling&amp;gt;&lt;br /&gt;&lt;/pre&gt;</content><link rel="alternate" type="text/html" href="http://feeds.feedburner.com/~r/PeterGfader/~3/227390561/entreprise-library-exception-handling.html" title="Entreprise Library:  Exception Handling Policies" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=6538953&amp;postID=530966548413708077" title="0 Comments" /><link rel="replies" type="application/atom+xml" href="http://peitor.blogspot.com/feeds/530966548413708077/comments/default" title="Post Comments" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6538953/posts/default/530966548413708077" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6538953/posts/default/530966548413708077" /><author><name>.peter.gfader.</name><uri>http://www.blogger.com/profile/07780415437484280285</uri><email>noreply@blogger.com</email></author><feedburner:origLink>http://peitor.blogspot.com/2008/02/entreprise-library-exception-handling.html</feedburner:origLink></entry><entry><id>tag:blogger.com,1999:blog-6538953.post-8126364350653995787</id><published>2008-01-31T14:06:00.000+01:00</published><updated>2008-01-31T14:08:36.098+01:00</updated><title type="text">XmlSerializers problems...</title><content type="html">Last days i got a strange error.&lt;br /&gt;&lt;br /&gt;Could not load file or assembly &lt;strong&gt;CodeGenerator.XmlSerializers &lt;/strong&gt;Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified.&lt;br /&gt;&lt;br /&gt;CodeGenerator = my actual working project&lt;br /&gt;&lt;br /&gt;even in fuslogvw.exe it seems to look for that strange assembly&lt;br /&gt;&lt;br /&gt;-&gt; Project Properties -&gt; Build&lt;br /&gt;-&gt; Generate serialization assembly = ON&lt;br /&gt;&lt;strong&gt;didnt work!&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;-&gt; Debug&lt;br /&gt;-&gt; Exceptions&lt;br /&gt;-&gt; Reset ALL&lt;br /&gt;&lt;strong&gt;WORKS!&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;details in:&lt;br /&gt;&lt;a href="http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=19949&amp;amp;SiteId=1"&gt;FileNotFoundException while calling web service from web service - MSDN Forums - couldn't locate myProject.XmlSerializers&lt;/a&gt;</content><link rel="alternate" type="text/html" href="http://feeds.feedburner.com/~r/PeterGfader/~3/226740959/could-not-load-file-or-assembly.html" title="XmlSerializers problems..." /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=6538953&amp;postID=8126364350653995787" title="0 Comments" /><link rel="replies" type="application/atom+xml" href="http://peitor.blogspot.com/feeds/8126364350653995787/comments/default" title="Post Comments" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6538953/posts/default/8126364350653995787" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6538953/posts/default/8126364350653995787" /><author><name>.peter.gfader.</name><uri>http://www.blogger.com/profile/07780415437484280285</uri><email>noreply@blogger.com</email></author><feedburner:origLink>http://peitor.blogspot.com/2008/01/could-not-load-file-or-assembly.html</feedburner:origLink></entry><entry><id>tag:blogger.com,1999:blog-6538953.post-4637822837663602771</id><published>2008-01-23T17:03:00.000+01:00</published><updated>2008-01-23T17:03:43.467+01:00</updated><title type="text">String.Intern() Method</title><content type="html">i knew that strings are immutable and that we should use Stringbuilder.&lt;br /&gt;&lt;br /&gt;but the method String.Intern(inputString) i didnt know!&lt;br /&gt;&lt;br /&gt;- the method looks up the intern string pool for inputString.&lt;br /&gt;- if it founds it, it assigns the reference to thisone.&lt;br /&gt;  and it will be not created a new instance of the inputString.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;consider memory consumption vs. performance !!!&lt;/strong&gt;&lt;br /&gt;we have more the performance problem than the memory consumption problem.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Link:&lt;br /&gt;&lt;a href="http://bobondevelopment.com/2007/05/19/optimize-memory-consumption-using-string-interning/"&gt;Bob On Development » Optimize Memory Consumption Using String Interning&lt;/a&gt;</content><link rel="alternate" type="text/html" href="http://feeds.feedburner.com/~r/PeterGfader/~3/223646479/stringintern-method.html" title="String.Intern() Method" /><link rel="related" href="http://bobondevelopment.com/2007/05/19/optimize-memory-consumption-using-string-interning/" title="String.Intern() Method" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=6538953&amp;postID=4637822837663602771" title="0 Comments" /><link rel="replies" type="application/atom+xml" href="http://peitor.blogspot.com/feeds/4637822837663602771/comments/default" title="Post Comments" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6538953/posts/default/4637822837663602771" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6538953/posts/default/4637822837663602771" /><author><name>.peter.gfader.</name><uri>http://www.blogger.com/profile/07780415437484280285</uri><email>noreply@blogger.com</email></author><feedburner:origLink>http://peitor.blogspot.com/2008/01/stringintern-method.html</feedburner:origLink></entry><entry><id>tag:blogger.com,1999:blog-6538953.post-7309733549814794718</id><published>2008-01-22T10:20:00.000+01:00</published><updated>2008-01-22T10:44:50.641+01:00</updated><title type="text">odp.net 1. Schritte und Fazit</title><content type="html">&lt;strong&gt;#1&lt;br /&gt;mit Enterprise Library 3 funzt odp.net nicht&lt;br /&gt;&lt;/strong&gt;&lt;br /&gt;wird nicht unterstützt&lt;br /&gt;es fehlt di Oracle.DataAccess.Client.OracleClientFactory&lt;br /&gt;ist erst in oracle client 11 drinnen&lt;br /&gt;&lt;br /&gt;tried to install dll in GAC mit gacutil&lt;br /&gt;but wrong version of Oracle.DataAccess.dll&lt;br /&gt;when i open my .dll in reflector then i cant see a OracleClientFactory.&lt;br /&gt;there is no Oracle.DataAccess.Client.OracleClientFactory in Oracle.DataAccess, Version=1.102.3.0, Culture=neutral, PublicKeyToken=89b483f429c47342&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;#2&lt;br /&gt;Default Werte von Storeds werden nicht unterstützt&lt;br /&gt;&lt;/strong&gt;like:&lt;br /&gt;PNUM_FROM_INDEX NUMBER := NULL,&lt;br /&gt;PNUM_TO_INDEX NUMBER := NULL,&lt;br /&gt;&lt;br /&gt;wenn Parameter weggelassen werden kommt&lt;br /&gt;06550: line 1, column 7:\nPLS-00306: wrong number or types of arguments in call to&lt;br /&gt;&lt;br /&gt;wenn Parameter dazu und .Value nicht gesetzt -&gt; wert = null in db&lt;br /&gt;&lt;br /&gt;auch mit oracle 10g dbms funzt nicht!&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Solution&lt;/strong&gt;&lt;br /&gt;Param must be added to command, but it will not have db's default value in the next case:&lt;br /&gt;PNUM_TO_INDEX NUMBER := 100,&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;#3&lt;br /&gt;beim aufruf im DAO ist die gleiche reihenfolge der params wie in plsql-signatur einzuhalten&lt;br /&gt;&lt;/strong&gt;&lt;br /&gt;auch mit oracle 10g&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;#4&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;Parameter weglassen mit Oracle10g&lt;br /&gt;&lt;/strong&gt;Test auf oracle 10G funzt auch nicht&lt;br /&gt;{"ORA-06550: line 1, column 7:\nPLS-00306: wrong number or types of arguments in call to 'SPC_RA_PG_TESTDATA'\nORA-06550: line 1, column 7:\nPL/SQL: Statement ignored"}&lt;br /&gt;&lt;br /&gt;und wenn Parameter übergeben und .Value nicht setzen auch nicht!&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;#5 &lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;DateTime.MaxValue &lt;/strong&gt;&lt;br /&gt;Probleme mit Select, Insert OK&lt;br /&gt;Fehler wenn dieses wieder geholt werden will (Select)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;-----------------------------------------&lt;br /&gt;&lt;strong&gt;was ändert sich?&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;in &lt;strong&gt;plsql&lt;/strong&gt;&lt;br /&gt;- kein TO_CLOB von xmltype&lt;br /&gt;- XMLTYPE ist XMLTYPE und nicht CLOB&lt;br /&gt;- reihenfolge der parameter&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;in &lt;strong&gt;DAO&lt;/strong&gt;&lt;br /&gt;getten von Out Parameter&lt;br /&gt;// HACK: BEFORE: recordCount = Convert.ToInt64(countParam.Value);&lt;br /&gt;recordCount = (long)((Oracle.DataAccess.Types.OracleDecimal)(countParam.Value)).Value;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Enterprise Library problem behoben mit:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;using (Oracle.DataAccess.Client.OracleConnection conn = new Oracle.DataAccess.Client.OracleConnection(connectionString))&lt;br /&gt;{&lt;br /&gt;  command.Connection = conn;&lt;br /&gt;  //Siag.DataAccess.Configuration.ConnectionProcessorConfigurationSection.Open(conn as System.Data.Common.DbConnection);&lt;br /&gt;  conn.Open();&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Lesen (SELECT) von BLOB CLOB und XMLTYPE&lt;br /&gt;&lt;/strong&gt;immer über Storeds&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;resultItem.SetLargedatablobWithoutStatusChange(reader.IsDBNull(indexLargedatablob) ? null : (byte[])reader.&lt;strong&gt;GetOracleBlob&lt;/strong&gt;(indexLargedatablob).Value);&lt;br /&gt;resultItem.SetLargedateclobWithoutStatusChange(reader.IsDBNull(indexLargedateclob) ? null : reader.&lt;strong&gt;GetOracleClob&lt;/strong&gt;(indexLargedateclob).Value);&lt;br /&gt;resultItem.SetXmlcontentWithoutStatusChange(reader.IsDBNull(indexXmlcontent) ? null : reader.&lt;strong&gt;GetOracleXmlType&lt;/strong&gt;(indexXmlcontent).&lt;strong&gt;GetXmlDocument&lt;/strong&gt;());&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Schreiben&lt;/strong&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;param = new Oracle.DataAccess.Client.OracleParameter("PXML_PGTD_XMLCONTENT", Oracle.DataAccess.Client.OracleDbType.XmlType);&lt;br /&gt;if (toPersist.Xmlcontent != null)&lt;br /&gt;{&lt;br /&gt;  param.Value = toPersist.Xmlcontent.&lt;strong&gt;InnerXml&lt;/strong&gt;;&lt;br /&gt;}&lt;br /&gt;command.Parameters.Add(param);&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://download.oracle.com/docs/html/B10961_01/features.htm"&gt;Mapping zwischen Oracle Datatype - .net Datatype - .net reader Get Method&lt;br /&gt;http://download.oracle.com/docs/html/B10961_01/features.htm&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;Oracle Native Datatype&lt;br /&gt;&lt;strong&gt;CLOB &lt;/strong&gt;- Character data can store up to 4 gigabytes (4 GB).&lt;br /&gt;&lt;strong&gt;BLOB &lt;/strong&gt;- Unstructured binary data can store up to 4 gigabytes.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;</content><link rel="alternate" type="text/html" href="http://feeds.feedburner.com/~r/PeterGfader/~3/220898856/odpnet-1-schritte-und-fazit.html" title="odp.net 1. Schritte und Fazit" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=6538953&amp;postID=7309733549814794718" title="0 Comments" /><link rel="replies" type="application/atom+xml" href="http://peitor.blogspot.com/feeds/7309733549814794718/comments/default" title="Post Comments" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6538953/posts/default/7309733549814794718" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6538953/posts/default/7309733549814794718" /><author><name>.peter.gfader.</name><uri>http://www.blogger.com/profile/07780415437484280285</uri><email>noreply@blogger.com</email></author><feedburner:origLink>http://peitor.blogspot.com/2008/01/odpnet-1-schritte-und-fazit.html</feedburner:origLink></entry><entry><id>tag:blogger.com,1999:blog-6538953.post-1906766714382281242</id><published>2007-12-19T15:20:00.000+01:00</published><updated>2008-01-22T10:44:41.637+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="generic constraints" /><category scheme="http://www.blogger.com/atom/ns#" term="c# 2.0 generics" /><title type="text">Generic Constraints thougths</title><content type="html">&lt;p&gt;There are 3 types of constraints. &lt;/p&gt;&lt;p&gt;A &lt;strong&gt;derivation constraint&lt;/strong&gt; indicates to the compiler that the generic type parameter derives from a base type such an interface or a particular base class. &lt;/p&gt;&lt;blockquote&gt;class LinkedList&lt;k,t&gt; where K : IComparable&lt;/blockquote&gt;&lt;p&gt;A &lt;strong&gt;default constructor constraint&lt;/strong&gt; indicates to the compiler that the generic type parameter exposes a default public constructor (a public constructor with no parameters). &lt;/p&gt;&lt;blockquote&gt;class Node&lt;k,t&gt; where T : new&lt;strong&gt;() &lt;/strong&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;/blockquote&gt;&lt;p&gt;A &lt;strong&gt;reference/value type constraint&lt;/strong&gt; constrains the generic type parameter to be a reference or a value type. &lt;/p&gt;&lt;blockquote&gt;&lt;p&gt;class MyClass&lt;t&gt; where T : &lt;strong&gt;struct&lt;/strong&gt;&lt;br /&gt;class MyClass&lt;t&gt; where T : &lt;strong&gt;class&lt;/strong&gt;&lt;/p&gt;&lt;/blockquote&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;</content><link rel="alternate" type="text/html" href="http://feeds.feedburner.com/~r/PeterGfader/~3/203770984/generic-constraints-thougths.html" title="Generic Constraints thougths" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=6538953&amp;postID=1906766714382281242" title="2 Comments" /><link rel="replies" type="application/atom+xml" href="http://peitor.blogspot.com/feeds/1906766714382281242/comments/default" title="Post Comments" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6538953/posts/default/1906766714382281242" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6538953/posts/default/1906766714382281242" /><author><name>.peter.gfader.</name><uri>http://www.blogger.com/profile/07780415437484280285</uri><email>noreply@blogger.com</email></author><feedburner:origLink>http://peitor.blogspot.com/2007/12/generic-constraints-thougths.html</feedburner:origLink></entry><entry><id>tag:blogger.com,1999:blog-6538953.post-6468446415373131201</id><published>2007-12-19T11:33:00.000+01:00</published><updated>2007-12-19T13:11:30.713+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="xml namespace" /><category scheme="http://www.blogger.com/atom/ns#" term="xml Elemente" /><category scheme="http://www.blogger.com/atom/ns#" term="xml" /><category scheme="http://www.blogger.com/atom/ns#" term="xml Attribute" /><title type="text">xml namespaces Seltsamheiten (german post)</title><content type="html">&lt;p&gt;Namespaces dienen der Eindeutigkeit von Elementen und Attributen.&lt;br /&gt;Namespaces sind beliebige Strings&lt;br /&gt;Namespaces bauen normalerweise auf URLs auf --&gt; Eindeutigkeit &lt;/p&gt;&lt;p&gt;Namespace Präfix dient zur Abkürzung (des Unique Identifiers)&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Deklaration von einem Namespace beinhaltet Nennung einer &lt;strong&gt;Namespace URI&lt;/strong&gt; sowie der Vergabe eines &lt;strong&gt;Präfixes&lt;/strong&gt; (=Stellvertreter) &lt;/p&gt;&lt;p&gt;Namespaces werden in Elementen deklariert&lt;br /&gt;Namespaces werden auf Element und Unterelement angewandt&lt;br /&gt;Unterelemente können jedoch Namespace überschreiben&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;pre&gt;&amp;lt;prefix:myElement xmlns:prefix="http://www.gfader.com&amp;gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Kombination aus Namespace und Name (Attribut oder Element) = &lt;strong&gt;Qualified Name&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;StandardNamespace&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&amp;lt;myElement xmlns="http://www.gfader.com"&amp;gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;leerer Namespace = unqualified Elements or Attributes&lt;br /&gt;Wird kein Namespace deklariert so gilt xmlns=""&lt;br /&gt;&lt;br /&gt;unqualified da sie nur lokalen Name und keinen Namespace haben&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Standard-Namespace sollte nicht verwendet werden da :&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Element OHNE Präfix im Standard-Namespace&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Attribut OHNE Präfix im leeren Namespace&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;Beispiel:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&amp;lt;prefix:myElement xmlns:prefix="gfader.com" myAttribute="value"&amp;gt;&lt;/pre&gt;&lt;br /&gt;myElement in StandardNamespace "gfader.com"&lt;br /&gt;myAttribute in leerem Namespace ""&lt;br /&gt;&lt;br /&gt;Damit auch myAttribute im selben Namespace ist:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&amp;lt;prefix:myElement xmlns:prefix="gfader.com" prefix:myAttribute="value"&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Zusammenfassung aus Uni Vorlesung von Clemens Kerer&lt;br /&gt;und&lt;br /&gt;dotnet Magazin Artikel von Martin Szugat&lt;br /&gt;Ausgabe 1/2.08 dot.net magazin - Aus dem Nähkästchen</content><link rel="alternate" type="text/html" href="http://feeds.feedburner.com/~r/PeterGfader/~3/203770985/xml-namespaces-seltsamheiten-german.html" title="xml namespaces Seltsamheiten (german post)" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=6538953&amp;postID=6468446415373131201" title="0 Comments" /><link rel="replies" type="application/atom+xml" href="http://peitor.blogspot.com/feeds/6468446415373131201/comments/default" title="Post Comments" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6538953/posts/default/6468446415373131201" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6538953/posts/default/6468446415373131201" /><author><name>.peter.gfader.</name><uri>http://www.blogger.com/profile/07780415437484280285</uri><email>noreply@blogger.com</email></author><feedburner:origLink>http://peitor.blogspot.com/2007/12/xml-namespaces-seltsamheiten-german.html</feedburner:origLink></entry><entry><id>tag:blogger.com,1999:blog-6538953.post-4823833950020904556</id><published>2007-12-14T17:59:00.000+01:00</published><updated>2007-12-15T20:31:00.991+01:00</updated><title type="text">Microsoft.mshtml .dll problems... und the solution!!</title><content type="html">i developed a winforms application that shows and edits html data.&lt;br /&gt;(for details see older posts)&lt;br /&gt;&lt;br /&gt;the control that i use, uses the mshtml library from the Microsoft.mshtml.dll found in the Application Folder of vs2008&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;"c:\Program Files\Microsoft Visual Studio 9.0\Visual Studio Tools for Office\PIA\Office11\Microsoft.mshtml.dll"&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;but this dll is ARRGGGH!&lt;br /&gt;&lt;br /&gt;following problems:&lt;br /&gt;&lt;br /&gt;gacutil /u&lt;br /&gt;uninstall doesnt work on my local machine&lt;br /&gt;&lt;br /&gt;gacutil /i&lt;br /&gt;install doesnt work on terminal server without vs2008&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="font-size:130%;color:#cc0000;"&gt;cause its delay signed, only public key!&lt;/span&gt;&lt;br /&gt;&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;i think that the assembly is installed by MSI Windows Installer&lt;br /&gt;and this adds some info to the registry&lt;br /&gt;&lt;br /&gt;&lt;a href="http://support.microsoft.com/kb/873195/en-us"&gt;http://support.microsoft.com/kb/873195/en-us&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="font-size:130%;"&gt;SOLUTION&lt;br /&gt;&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;1. Download: Primary Interop Assemblies for Office 2003 from msdn&lt;br /&gt;2. then installed the PIA 2003 msi from the packed exe&lt;br /&gt;3. used this dll&lt;br /&gt;4. deploy this dll&lt;br /&gt;everything is fine!&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;details&lt;br /&gt;verification of the dlls&lt;br /&gt;&lt;br /&gt;\Program Files\Microsoft Visual Studio 9.0\Visual Studio Tools for Office\PIA\Office12&gt;&lt;strong&gt;sn -v Microsoft.mshtml.dll&lt;/strong&gt;--&gt; Microsoft.mshtml.dll is a delay-signed or test-signed assembly&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;dll from vs2008 PIA folder&lt;br /&gt;&lt;strong&gt;sn -v Microsoft.mshtml.dll&lt;/strong&gt;&lt;br /&gt;Microsoft (R) .NET Framework Strong Name Utility Version 2.0.50727.42&lt;br /&gt;Copyright (c) Microsoft Corporation. All rights reserved.&lt;br /&gt;--&gt; Assembly 'Microsoft.mshtml.dll' is valid</content><link rel="alternate" type="text/html" href="http://feeds.feedburner.com/~r/PeterGfader/~3/200699328/microsoftmshtml-dll-problems-und.html" title="Microsoft.mshtml .dll problems... und the solution!!" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=6538953&amp;postID=4823833950020904556" title="2 Comments" /><link rel="replies" type="application/atom+xml" href="http://peitor.blogspot.com/feeds/4823833950020904556/comments/default" title="Post Comments" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6538953/posts/default/4823833950020904556" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6538953/posts/default/4823833950020904556" /><author><name>.peter.gfader.</name><uri>http://www.blogger.com/profile/07780415437484280285</uri><email>noreply@blogger.com</email></author><feedburner:origLink>http://peitor.blogspot.com/2007/12/microsoftmshtml-dll-problems-und.html</feedburner:origLink></entry><entry><id>tag:blogger.com,1999:blog-6538953.post-7579123065270082131</id><published>2007-12-05T11:10:00.000+01:00</published><updated>2007-12-05T11:14:33.427+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="tinymce" /><category scheme="http://www.blogger.com/atom/ns#" term="htmlcontrol" /><category scheme="http://www.blogger.com/atom/ns#" term="winforms" /><title type="text">How to get javasrcipt returnValue from webbrowser control (tinymce htmlcode fron webbrowser)</title><content type="html">In my &lt;a href="http://peitor.blogspot.com/2007/12/great-windows-forms-html-control.html"&gt;previous post &lt;/a&gt;about the htmlcontrol i have not explained how i communicate with the tinymce javascript to get the actual values from the textarea.&lt;br /&gt;&lt;br /&gt;Here is it how it works...&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;string valueFromTinyMce;&lt;br /&gt;&lt;br /&gt;IHTMLDocument2 htdoc2 = editor2.HTMLDocument2;&lt;br /&gt;IHTMLWindow2 parentWindow = htdoc2.parentWindow;&lt;br /&gt;if (parentWindow != null)&lt;br /&gt;{&lt;br /&gt; IHTMLElement el = htdoc2.createElement("input");&lt;br /&gt; el.id = "myValue";&lt;br /&gt; ((IHTMLDOMNode)htdoc2.body).appendChild((IHTMLDOMNode)el);&lt;br /&gt;&lt;br /&gt; parentWindow.execScript("document.all['myValue'].value = tinyMCE.getContent('mce_editor_0')", "javascript");&lt;br /&gt;&lt;br /&gt; valueFromTinyMce = el.getAttribute("value", 0);&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;</content><link rel="alternate" type="text/html" href="http://feeds.feedburner.com/~r/PeterGfader/~3/195699132/how-to-get-javasrcipt-returnvalue-from.html" title="How to get javasrcipt returnValue from webbrowser control (tinymce htmlcode fron webbrowser)" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=6538953&amp;postID=7579123065270082131" title="0 Comments" /><link rel="replies" type="application/atom+xml" href="http://peitor.blogspot.com/feeds/7579123065270082131/comments/default" title="Post Comments" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6538953/posts/default/7579123065270082131" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6538953/posts/default/7579123065270082131" /><author><name>.peter.gfader.</name><uri>http://www.blogger.com/profile/07780415437484280285</uri><email>noreply@blogger.com</email></author><feedburner:origLink>http://peitor.blogspot.com/2007/12/how-to-get-javasrcipt-returnvalue-from.html</feedburner:origLink></entry><entry><id>tag:blogger.com,1999:blog-6538953.post-8468392927416186075</id><published>2007-12-05T11:03:00.001+01:00</published><updated>2008-06-07T07:48:52.230+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="htmlcontrol" /><category scheme="http://www.blogger.com/atom/ns#" term="winforms" /><title type="text">GREAT Windows Forms Html Control</title><content type="html">I finally found a working HTMLControl to show and Edit HTML Content for Windows Forms Applications.&lt;br /&gt;&lt;br /&gt;It uses internally a webeditor Control, and works great.&lt;br /&gt;I did not verify memory usage  :-)&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.codeproject.com/cs/miscctrl/editor_in_windows_forms.asp" target="_blank"&gt;http://www.codeproject.com/cs/miscctrl/editor_in_windows_forms.asp&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Maybe this link will work!&lt;br /&gt;&lt;a href="http://www.codeproject.com/KB/edit/editor_in_windows_forms.aspx"&gt;http://www.codeproject.com/KB/edit/editor_in_windows_forms.aspx&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;I have modified it to work with tinyMce.&lt;br /&gt;Normally it is in NON Enabled Mode.&lt;br /&gt;If it goes into Editmode (DesignModeEnabled=true) then it shows the tinymce&lt;br /&gt;&lt;br /&gt;&lt;a href="http://tinymce.moxiecode.com/" target="_blank"&gt;http://tinymce.moxiecode.com/&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;If someone is interested in my code let me know...&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;EDIT&lt;br /&gt;&lt;a href="http://peitor.blogspot.com/2008/02/tinymce-with-webeditor-control-in.html"&gt;i have made some screenshots.&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://peitor.blogspot.com/2007/12/how-to-get-javasrcipt-returnvalue-from.html"&gt;And here i explain how you can communicate with the hosted webeditor, resp. tinymce&lt;/a&gt;</content><link rel="alternate" type="text/html" href="http://feeds.feedburner.com/~r/PeterGfader/~3/195699133/great-windows-forms-html-control.html" title="GREAT Windows Forms Html Control" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=6538953&amp;postID=8468392927416186075" title="10 Comments" /><link rel="replies" type="application/atom+xml" href="http://peitor.blogspot.com/feeds/8468392927416186075/comments/default" title="Post Comments" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6538953/posts/default/8468392927416186075" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6538953/posts/default/8468392927416186075" /><author><name>.peter.gfader.</name><uri>http://www.blogger.com/profile/07780415437484280285</uri><email>noreply@blogger.com</email></author><feedburner:origLink>http://peitor.blogspot.com/2007/12/great-windows-forms-html-control.html</feedburner:origLink></entry><entry><id>tag:blogger.com,1999:blog-6538953.post-4912961749471738806</id><published>2007-11-26T10:24:00.000+01:00</published><updated>2007-11-26T10:43:05.754+01:00</updated><title type="text">Unable to load DLL oramts.dll  - Oracle DB with Transcations</title><content type="html">To use the Oracle Client with Transactions (TransactionScope)&lt;br /&gt;you must install: Oracle Services For MTS &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Client.Net_9207\Disk1&lt;br /&gt;Start SETUP -&gt; Oracle Services For MTS ...&lt;br /&gt;&lt;br /&gt;MTS = Microsoft Transaction Server&lt;br /&gt;&lt;br /&gt;Then you can use code like this with Oracle DBMS&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;using(System.Transactions.TransactionScope scope = new System.Transactions.TransactionScope())&lt;br /&gt;{&lt;br /&gt;    finally&lt;br /&gt;   {&lt;br /&gt;          if (conn != null)&lt;br /&gt;          {&lt;br /&gt;              conn.Close();&lt;br /&gt;          }&lt;br /&gt;   }&lt;br /&gt;   scope.Complete();&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;</content><link rel="alternate" type="text/html" href="http://feeds.feedburner.com/~r/PeterGfader/~3/190814242/unable-to-load-dll-oramtsdll-oracle-db.html" title="Unable to load DLL oramts.dll  - Oracle DB with Transcations" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=6538953&amp;postID=4912961749471738806" title="0 Comments" /><link rel="replies" type="application/atom+xml" href="http://peitor.blogspot.com/feeds/4912961749471738806/comments/default" title="Post Comments" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6538953/posts/default/4912961749471738806" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6538953/posts/default/4912961749471738806" /><author><name>.peter.gfader.</name><uri>http://www.blogger.com/profile/07780415437484280285</uri><email>noreply@blogger.com</email></author><feedburner:origLink>http://peitor.blogspot.com/2007/11/unable-to-load-dll-oramtsdll-oracle-db.html</feedburner:origLink></entry><entry><id>tag:blogger.com,1999:blog-6538953.post-5898163579757158621</id><published>2007-11-21T10:42:00.000+01:00</published><updated>2007-11-21T10:44:12.711+01:00</updated><title type="text">Solution to: System.InvalidOperationException: There is already an open DataReader associated with this Command which must be closed first.</title><content type="html">from an internet website:&lt;br /&gt;a &lt;strong&gt;datareader represents an open connection to the database&lt;/strong&gt;.&lt;br /&gt;to run 2 readers simultaneously, you need to use two seperate connections.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;#1&lt;/strong&gt;&lt;br /&gt;just change your connection string to add it back (add MultipleActiveResultSets=True to connection string).&lt;a href="http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=123691&amp;amp;SiteID=1"&gt;http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=123691&amp;amp;SiteID=1&lt;/a&gt;&lt;br /&gt;&lt;strong&gt;NO SOLUTION&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;#2&lt;/strong&gt;&lt;br /&gt;new Connection on every GetConnection() --&gt; no singleton&lt;br /&gt;&lt;strong&gt;NO SOLUTION&lt;/strong&gt;&lt;br /&gt;ERROR: Invalid attempt to MetaData when reader is closed.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;#3&lt;/strong&gt;&lt;br /&gt;connectionstring always another!&lt;br /&gt;&lt;strong&gt;NO SOLUTION&lt;/strong&gt;&lt;br /&gt;ERROR: Invalid attempt to MetaData when reader is closed.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;#4&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;BackgroundWorker solves the problem!&lt;/strong&gt;</content><link rel="alternate" type="text/html" href="http://feeds.feedburner.com/~r/PeterGfader/~3/188364519/solution-to-systeminvalidoperationexcep.html" title="Solution to: System.InvalidOperationException: There is already an open DataReader associated with this Command which must be closed first." /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=6538953&amp;postID=5898163579757158621" title="0 Comments" /><link rel="replies" type="application/atom+xml" href="http://peitor.blogspot.com/feeds/5898163579757158621/comments/default" title="Post Comments" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6538953/posts/default/5898163579757158621" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6538953/posts/default/5898163579757158621" /><author><name>.peter.gfader.</name><uri>http://www.blogger.com/profile/07780415437484280285</uri><email>noreply@blogger.com</email></author><feedburner:origLink>http://peitor.blogspot.com/2007/11/solution-to-systeminvalidoperationexcep.html</feedburner:origLink></entry><entry><id>tag:blogger.com,1999:blog-6538953.post-1526709146489369484</id><published>2007-11-20T11:34:00.000+01:00</published><updated>2007-11-20T11:37:17.033+01:00</updated><title type="text">Flagsattribute - How to remove a flag from flaglist</title><content type="html">Is in this documentation not so easy to find...&lt;br /&gt;&lt;br /&gt;But it works with the Bitwise XOR Assignment Operator!&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;FontStyle fontStyle = this.textBox1.Font.Style;&lt;br /&gt;fontStyle = FontStyle.Italic FontStyle.Bold;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;fontStyle = fontStyle ^ FontStyle.Bold;&lt;/strong&gt;&lt;br /&gt;//Removes the flag Bold from the fontStyle flagAttributes list&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://msdn2.microsoft.com/de-de/library/system.flagsattribute(VS.80).aspx"&gt;http://msdn2.microsoft.com/de-de/library/system.flagsattribute(VS.80).aspx &lt;/a&gt;</content><link rel="alternate" type="text/html" href="http://feeds.feedburner.com/~r/PeterGfader/~3/187795817/flagsattribute-how-to-remove-flag-from.html" title="Flagsattribute - How to remove a flag from flaglist" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=6538953&amp;postID=1526709146489369484" title="0 Comments" /><link rel="replies" type="application/atom+xml" href="http://peitor.blogspot.com/feeds/1526709146489369484/comments/default" title="Post Comments" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6538953/posts/default/1526709146489369484" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6538953/posts/default/1526709146489369484" /><author><name>.peter.gfader.</name><uri>http://www.blogger.com/profile/07780415437484280285</uri><email>noreply@blogger.com</email></author><feedburner:origLink>http://peitor.blogspot.com/2007/11/flagsattribute-how-to-remove-flag-from.html</feedburner:origLink></entry><entry><id>tag:blogger.com,1999:blog-6538953.post-4135428335853805308</id><published>2007-10-26T13:33:00.001+02:00</published><updated>2007-12-03T14:45:33.944+01:00</updated><title type="text">Programmatically change Acceptbutton want work!</title><content type="html">If you try to change the Form.Acceptbutton of a form in the Click event of another button, that is currently the Acceptbutton then you must:&lt;br /&gt;&lt;br /&gt;#1&lt;br /&gt;//Select next control (simulates Tab press)&lt;br /&gt;this.SelectNextControl(this, true, true, true, true);&lt;br /&gt;&lt;br /&gt;#2&lt;br /&gt;//Set new Acceptbutton&lt;br /&gt;this.ParentForm.AcceptButton = buttonLogin;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;when you press Enter 2times now it works!&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;UPDATE&lt;/strong&gt;if SelectNextControl doesnt work use&lt;br /&gt;&lt;br /&gt;this.SelectNextControl(buttonWhichIsActuallySelected, true, true, true, true);&lt;br /&gt;&lt;br /&gt;then it should work!</content><link rel="alternate" type="text/html" href="http://feeds.feedburner.com/~r/PeterGfader/~3/175612064/programmaticall-change-acceptbutton.html" title="Programmatically change Acceptbutton want work!" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=6538953&amp;postID=4135428335853805308" title="0 Comments" /><link rel="replies" type="application/atom+xml" href="http://peitor.blogspot.com/feeds/4135428335853805308/comments/default" title="Post Comments" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6538953/posts/default/4135428335853805308" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6538953/posts/default/4135428335853805308" /><author><name>.peter.gfader.</name><uri>http://www.blogger.com/profile/07780415437484280285</uri><email>noreply@blogger.com</email></author><feedburner:origLink>http://peitor.blogspot.com/2007/10/programmaticall-change-acceptbutton.html</feedburner:origLink></entry></feed>
