<?xml version="1.0" encoding="iso-8859-1"?>
<feed version="0.3" xmlns="http://purl.org/atom/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" xml:lang="en">
  <title>Daniel Morgan</title>
  <link rel="alternate" type="text/html" href="http://www.mfconsulting.com/danmorg/blog/" />
  <modified>2008-09-11T02:30:22Z</modified>
  <tagline></tagline>
  <id>tag:www.mfconsulting.com,2008:/danmorg/blog/5</id>
  <generator url="http://www.movabletype.org/" version="2.661">Movable Type</generator>
  <copyright>Copyright (c) 2008, danmorg</copyright>
  <entry>
    <title>Mono&apos;s interacive C# and using System.Data</title>
    <link rel="alternate" type="text/html" href="http://www.mfconsulting.com/danmorg/blog/archives/000170.html" />
    <modified>2008-09-11T02:30:22Z</modified>
    <issued>2008-09-10T22:30:22-05:00</issued>
    <id>tag:www.mfconsulting.com,2008:/danmorg/blog/5.170</id>
    <created>2008-09-11T02:30:22Z</created>
    <summary type="text/plain">I wanted to try out the new tool called csharp which allows you to interfactively enter commmands in C# and it compiles and run them. In my case, I wanted to see it connecting to a database. Here is my...</summary>
    <author>
      <name>danmorg</name>
      
      <email>danielmorgan@verizon.net</email>
    </author>
    <dc:subject>Mono</dc:subject>
    <content type="text/html" mode="escaped" xml:lang="en" xml:base="http://www.mfconsulting.com/danmorg/blog/">
      <![CDATA[<p>I wanted to try out the new tool called csharp which allows you to interfactively enter commmands in C# and it compiles and run them.  In my case, I wanted to see it connecting to a database. Here is my results - typos and all:</p>

<p>danmorg@danspc:~/monosvn/monoinstall/etc/mono> csharp<br />
Mono C# Shell, type "help;" for help</p>

<p>Enter statements below.<br />
csharp> LoadAssembly("System.Data.dll");<br />
csharp> using System.Data;  <br />
csharp> using System.Data.Common;<br />
csharp> DbProviderFactory factory = DbProviderFactories.GetFactory("System.Data.OracleClient");<br />
csharp> IDbConnection con = (IDbConnection) factory.CreateConnection();<br />
csharp> con.ConnectionString = "server=testdb;user id=scott;password=tiger";<br />
"server=testdb;user id=scott;password=tiger"<br />
csharp> con.Open();<br />
csharp> con.State;<br />
Open<br />
csharp> IDbCommand cmd = con.CreateCommand();<br />
csharp> cmd.CommadText = "select 'one' as num from dual union select 'two' from dual union select 'three' from dual";<br />
<interactive>(1,6): error CS1061: Type `System.Data.IDbCommand' does not contain a definition for `CommadText' and no extension method `CommadText' of type `System.Data.IDbCommand' could be found (are you missing a using directive or an assembly reference?)<br />
csharp> cmd.CommandText = "select 'one' as num from dual union select 'two' from"select 'one' as num from dual union select 'two' from dual union select 'three' from dual"<br />
csharp> IDataReader reader = cmd.ExecuteReader();<br />
csharp> whlie (reader.Read())<br />
      > Console.WriteLine(reader.GetString(0));<br />
<interactive>(1,2): error CS1002: Expecting `;'<br />
<interactive>(2,8): error CS1002: Expecting `[', `)', `,', `;', or `=', got .<br />
csharp> while (reader.Read())                   <br />
      > Console.WriteLine(reader.GetString(0)); <br />
one<br />
three<br />
two<br />
csharp> reader.Close();<br />
csharp> con.Close();<br />
csharp> con.State;<br />
Closed</p>

<p>The errors I got usually were due to typos.  I didn't have to re-type everything, just clicked the up arrow to get a command in my history.</p>

<p>Also, here are two important commands to remember:</p>

<p>To get help, type: help;</p>

<p>To quit, type:<br />
quit:</p>]]>
      
    </content>
  </entry>
  <entry>
    <title>Go OO!</title>
    <link rel="alternate" type="text/html" href="http://www.mfconsulting.com/danmorg/blog/archives/000165.html" />
    <modified>2007-10-03T18:30:06Z</modified>
    <issued>2007-10-03T14:30:06-05:00</issued>
    <id>tag:www.mfconsulting.com,2007:/danmorg/blog/5.165</id>
    <created>2007-10-03T18:30:06Z</created>
    <summary type="text/plain">I have to agree with what Federico says today. Love this quote &quot;C++ is really good at making people think that you can turn it into a real language, while in fact you do nothing but put crutches to clutter...</summary>
    <author>
      <name>danmorg</name>
      
      <email>danielmorgan@verizon.net</email>
    </author>
    <dc:subject>Free Software</dc:subject>
    <content type="text/html" mode="escaped" xml:lang="en" xml:base="http://www.mfconsulting.com/danmorg/blog/">
      <![CDATA[<p>I have to agree with what <a href="http://www.gnome.org/~federico/news-2007-10.html#03">Federico</a> says today.</p>

<p>Love this quote "C++ is really good at making people think that you can turn it into a real language, while in fact you do nothing but put crutches to clutter the code into simulating the features of real languages".  So true, so true.  </p>

<p>I personally have found openoffice.org to build harder than GNOME.  And, let me tell you, GNOME is not a simple task itself to build.  </p>

<p>Maybe Sun measures their specifications in the number of pounds.</p>

<p>Hmmm...  Your specification only weighs 30 pounds -- it needs to be 50 pounds and then I may consider it.</p>]]>
      
    </content>
  </entry>
  <entry>
    <title>Misunderstanding the General Public License</title>
    <link rel="alternate" type="text/html" href="http://www.mfconsulting.com/danmorg/blog/archives/000164.html" />
    <modified>2007-09-04T11:06:29Z</modified>
    <issued>2007-09-04T07:06:29-05:00</issued>
    <id>tag:www.mfconsulting.com,2007:/danmorg/blog/5.164</id>
    <created>2007-09-04T11:06:29Z</created>
    <summary type="text/plain">Apparently, there are developers who release their source code under the GPL without understanding what it says. Or did I misunderstand the author? For example: ExcelPackage is an Open Source project provided under the GNU General Public License (GPL) as...</summary>
    <author>
      <name>danmorg</name>
      
      <email>danielmorgan@verizon.net</email>
    </author>
    <dc:subject>Free Software</dc:subject>
    <content type="text/html" mode="escaped" xml:lang="en" xml:base="http://www.mfconsulting.com/danmorg/blog/">
      <![CDATA[<p>Apparently, there are developers who release their source code under the GPL without understanding what it says.   Or did I misunderstand the author?</p>

<p>For example:</p>

<p>ExcelPackage is an Open Source project provided under the<br />
GNU General Public License (GPL) as published by the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA</p>

<p>The GNU General Public License can be viewed at http://www.opensource.org/licenses/gpl-license.php<br />
If you unfamiliar with this license or have questions about it, here is an http://www.gnu.org/licenses/gpl-faq.html.</p>

<p>The code for this project may be used and redistributed by any means <b>PROVIDING it is not sold for profit without the author's written consent</b>, and providing that this notice and the author's name and all copyright notices remain intact.</p>

<p>Emphasis was mine.</p>]]>
      
    </content>
  </entry>
  <entry>
    <title>gnome moving to subversion</title>
    <link rel="alternate" type="text/html" href="http://www.mfconsulting.com/danmorg/blog/archives/000155.html" />
    <modified>2006-12-30T23:28:09Z</modified>
    <issued>2006-12-30T18:28:09-05:00</issued>
    <id>tag:www.mfconsulting.com,2006:/danmorg/blog/5.155</id>
    <created>2006-12-30T23:28:09Z</created>
    <summary type="text/plain">Way to go GNOME with your cvs to subversion conversion!...</summary>
    <author>
      <name>danmorg</name>
      
      <email>danielmorgan@verizon.net</email>
    </author>
    <dc:subject>GNOME/gtk+</dc:subject>
    <content type="text/html" mode="escaped" xml:lang="en" xml:base="http://www.mfconsulting.com/danmorg/blog/">
      <![CDATA[<p>Way to go GNOME with your cvs to subversion conversion!<br />
</p>]]>
      
    </content>
  </entry>
  <entry>
    <title>Ximian/Novell Edition of Openoffice.org</title>
    <link rel="alternate" type="text/html" href="http://www.mfconsulting.com/danmorg/blog/archives/000151.html" />
    <modified>2006-12-04T20:45:44Z</modified>
    <issued>2006-12-04T15:45:44-05:00</issued>
    <id>tag:www.mfconsulting.com,2006:/danmorg/blog/5.151</id>
    <created>2006-12-04T20:45:44Z</created>
    <summary type="text/plain">Novell / Ximian has had their own edition of openoffice.org for years. Everything they do is made as patches ready to go upstream so the patches can be merged with the mainline edition. If Novell/Ximian never did this, you would...</summary>
    <author>
      <name>danmorg</name>
      
      <email>danielmorgan@verizon.net</email>
    </author>
    <dc:subject>Linux</dc:subject>
    <content type="text/html" mode="escaped" xml:lang="en" xml:base="http://www.mfconsulting.com/danmorg/blog/">
      <![CDATA[<p>Novell / Ximian has had their own edition of openoffice.org for years.  Everything they do is made as patches ready to go upstream so the patches can be merged with the mainline edition.  If Novell/Ximian never did this, you would have a broken openoffice.org.  This is the same with other distributions.  Ubuntu Linux does not distribute the vanilla openoffice.org other.  </p>

<p>From what I have seen, it is a major pain in the ass to get sun engineers to get open office.org patches moving along.</p>

<p>I do wish groklaw.net would stop spreading FUD.  I thought they were about finding the facts.  It appears not!</p>]]>
      
    </content>
  </entry>
  <entry>
    <title>Riding a SLED on Windows to SQL Server</title>
    <link rel="alternate" type="text/html" href="http://www.mfconsulting.com/danmorg/blog/archives/000145.html" />
    <modified>2006-08-06T06:35:36Z</modified>
    <issued>2006-08-06T02:35:36-05:00</issued>
    <id>tag:www.mfconsulting.com,2006:/danmorg/blog/5.145</id>
    <created>2006-08-06T06:35:36Z</created>
    <summary type="text/plain">I tried the Mono-SLED VMWare image from Novell. SLED stands for SuSe Linux Enterprise Desktop. I wanted to try to see if I could connect to Microsoft SQL Server 2005 Express running on my Windows box from the SLED guest...</summary>
    <author>
      <name>danmorg</name>
      
      <email>danielmorgan@verizon.net</email>
    </author>
    <dc:subject>Mono</dc:subject>
    <content type="text/html" mode="escaped" xml:lang="en" xml:base="http://www.mfconsulting.com/danmorg/blog/">
      <![CDATA[<p>I tried the Mono-SLED VMWare image from Novell.</p>

<p>SLED stands for SuSe Linux Enterprise Desktop.</p>

<p>I wanted to try to see if I could connect to Microsoft SQL Server 2005 Express running on my Windows box from the SLED guest using a Mono application.  So, I tried.</p>

<p>It failed -- at first.</p>

<p>To test to see if I could get it working on Linux, I tried first on Windows to see if I could connect via TCP/IP.  On Windows, I copied sqlsharp.exe from my Mono installation bin path to somewhere outside of the mono installation.  I then started a Microsoft .NET SDK Command Prompt.  I started sqlsharp.exe</p>

<p>G:\>sqlsharp.exe</p>

<p>SQL# \provider sqlclient<br />
The default Provider is SQLCLIENT</p>

<p>SQL# \connectionstring server=MYHOST\SQLEXPRESS;DATABASE=master;user id=sa;password=mypass</p>

<p>SQL# \open<br />
Opening connection...<br />
Open was successfull.</p>

<p>I tried the same using mono on Windows:</p>

<p>G:\>mono sqlsharp.exe</p>

<p>SQL# \open<br />
Opening connection...<br />
Exception Caught Opening. SQL Server does not exist or access denied.</p>

<p>Hmmm...  How come Microsoft .NET works but Mono does not?<br />
MSDN says dbmssocn (library which uses TCP/IP to connect to SQL Server) is the default library to use.  However, I have proved this to be false.  </p>

<p>Now, try this connection string in sqlharp on the .NET SDK. I explicitly set the network library to dbmssocn.</p>

<p>SQL# \connectionstring server=MYHOST\SQLEXPRESS;DATABASE=master;user id=sa;password=mypass;network library=dbmssocn</p>

<p>SQL# \open<br />
Opening connection...<br />
Exception Caught Opening. Specified SQL server not found: MYHOST\SQLEXPRESS</p>

<p>If you tried connecting via Mono and TCP is not enabled on SQL Server, you might have gotten:<br />
SQL# \open<br />
Opening connection...<br />
Exception Caught Opening. Only TCP/IP is supported.</p>

<p>By default, SQL Server 2005 Express has TCP/IP disabled.  So, you have to go into SQL Server Configuration Manager and enable TCP/IP for each instance you wish to connect via TCP/IP.  But, you also must make sure the TCP/IP Protocol is one of the allowed client protocols.  I also made sure my firewall allowed mono.exe and sqlsharp.exe to do networking.  And I allowed the SQL Server Monitor UDP Port 1434 in my firewall.  If this udp port is not enabled, then SqlClient running on Linux will not be able to get the TCP port to connect to based on the instance name SQLEXPRESS.</p>

<p>SQL Server 2005 Network Configuration<br />
    Protocols for SQLEXPRESS<br />
       enable TCP/IP<br />
and<br />
SQL Server Native Client<br />
   Client Protocols<br />
       enable TCP/IP</p>

<p>If SLED can't find your hostname, use the ipconfig command on Windows to get your IP Address.  Ipconfig will list the IP address for your VMWare guest (SLED) as well.</p>

<p>Once this is done, you can connect to SQL Server 2005 from Mono running on SLED.  A valid query to use is:</p>

<p>select * from sysdatabases;</p>

<p>Moreover, the Mono-SLED VMWare image provides a good way to test your .net apps to see if they will run on Mono on Linux.  This is important if you want to develop applications that run on .net on windows and mono on linux on the same machine.  Dual-boot will not work because SQL Server only runs on Windows.</p>]]>
      
    </content>
  </entry>
  <entry>
    <title>MonoDevelop on Windows</title>
    <link rel="alternate" type="text/html" href="http://www.mfconsulting.com/danmorg/blog/archives/000143.html" />
    <modified>2006-06-28T03:42:12Z</modified>
    <issued>2006-06-27T23:42:12-05:00</issued>
    <id>tag:www.mfconsulting.com,2006:/danmorg/blog/5.143</id>
    <created>2006-06-28T03:42:12Z</created>
    <summary type="text/plain">MonoDevelop Tak and I have been trying to port MonoDevelop to Windows. With help from Tak, Alp, latexer, and cj, we are getting somewhere. This continues work based on the others, such as, Paco. MonoDevelop on Windows - Splash screen...</summary>
    <author>
      <name>danmorg</name>
      
      <email>danielmorgan@verizon.net</email>
    </author>
    <dc:subject>Mono</dc:subject>
    <content type="text/html" mode="escaped" xml:lang="en" xml:base="http://www.mfconsulting.com/danmorg/blog/">
      <![CDATA[<p><b>MonoDevelop</b></p>

<p>Tak and I have been trying to port MonoDevelop to Windows.  With help from Tak, Alp, latexer, and cj, we are getting somewhere.  This continues work based on the others, such as, Paco.</p>

<p><a href="http://static.flickr.com/48/176757624_9d6a6ba622.jpg?v=0">MonoDevelop on Windows - Splash screen</a></p>

<p><a href="http://static.flickr.com/46/176757627_54e37c2b11.jpg?v=0">MonoDevelop on Windows - Main screen after it loads right after the Splash screen</a></p>

<p><a href="http://static.flickr.com/61/176757628_e3532535c7.jpg?v=0">MonoDevelop on Windows - New Project</a></p>

<p><a href="http://static.flickr.com/60/176757629_c3ebfe643d.jpg?v=0">MonoDevelop on Windows - Test Project created via New Project screen</a></p>

<p>The GTK# GUI Designer (GtkCore/Stetic) Add-In and the WelcomePage Add-In were disabled to get MonoDevelop to run.  New projects and files can be created and edited, but projects can not be built yet.<br />
Hopefully, Tak can whip it into shape to build projects soon.</p>

<p><b>Evolution</b></p>

<p>You know, I forgot to blog my Evolution for Windows screenshots earlier.  So, here they are while giving links out.</p>

<p><a href="http://static.flickr.com/69/173973461_2e8584d986.jpg?v=0">Evolution for Windows - Calendar</a></p>

<p><a href="http://static.flickr.com/68/173973460_4250e9510d.jpg?v=0">Evolution for Windows - Appointment</a></p>

<p><a href="http://static.flickr.com/77/173973459_330497e990.jpg?v=0">Evolution for Windows - email</a></p>]]>
      
    </content>
  </entry>
  <entry>
    <title>Evolution for Windows</title>
    <link rel="alternate" type="text/html" href="http://www.mfconsulting.com/danmorg/blog/archives/000142.html" />
    <modified>2006-06-24T19:33:45Z</modified>
    <issued>2006-06-24T15:33:45-05:00</issued>
    <id>tag:www.mfconsulting.com,2006:/danmorg/blog/5.142</id>
    <created>2006-06-24T19:33:45Z</created>
    <summary type="text/plain">Just in case you haven&apos;t heard. There is an installer for Evolution on Windows available. http://shellter.sourceforge.net/evolution/ Evolution is a groupware client that includes email, calendar, and appointments....</summary>
    <author>
      <name>danmorg</name>
      
      <email>danielmorgan@verizon.net</email>
    </author>
    <dc:subject>GNOME/gtk+</dc:subject>
    <content type="text/html" mode="escaped" xml:lang="en" xml:base="http://www.mfconsulting.com/danmorg/blog/">
      <![CDATA[<p>Just in case you haven't heard.  There is an installer for Evolution on Windows available.  </p>

<p><a href="http://shellter.sourceforge.net/evolution/">http://shellter.sourceforge.net/evolution/</a></p>

<p>Evolution is a groupware client that includes email, calendar, and appointments.</p>]]>
      
    </content>
  </entry>

</feed>