<?xml version="1.0" encoding="iso-8859-1"?>
<rss version="2.0">
<channel>
  <title>Linux Format forums</title>
  <link>http://www.linuxformat.com/forums/index.php</link>
  <description>Help, discussion, magazine feedback and more</description>
  <language>english</language>
  <copyright>(c) Copyright Thu Jun 20, 2013 11:54 am by Linux Format forums</copyright>
  <managingEditor>webmaster@linuxformat.com</managingEditor>
  <webMaster>webmaster@linuxformat.com</webMaster>
  <pubDate>Thu Jun 20, 2013 11:54 am</pubDate>
  <lastBuildDate>Thu Jun 20, 2013 11:54 am</lastBuildDate>
  <docs>http://backend.userland.com/rss</docs>
  <generator>phpBB2 RSS Syndication Mod by Lucas</generator>
  <ttl>1</ttl>

  <image>
    <title>Linux Format forums</title>
    <url></url>
    <link>http://www.linuxformat.com/forums/</link>
    <description>Help, discussion, magazine feedback and more</description>
  </image>

                                      <item>
                                        <title>[Solved] Mono and Sqlite</title>
                                        <link>http://www.linuxformat.com/forums/viewtopic.php?p=13112#13112</link>
                                        <description>&lt;br /&gt;
                                      Author: &lt;a href='http://www.linuxformat.com/forums/profile.php?mode=viewprofile&amp;u=148'&gt;tedius&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;
                                      Posted: Tue Nov 29, 2005 10:38 am&lt;br /&gt;&lt;br /&gt;
                                      &lt;br /&gt;&lt;br /&gt;
                                      I have found out what the problem is.&lt;br /&gt;
&lt;br /&gt;
I'm using sqlite3 and for this they have changed the @ for :.  So once I had replaced all my @ signs with : signs it worked fine.</description>
                                        <comments>http://www.linuxformat.com/forums/viewtopic.php?p=13112#13112</comments>
                                        <author>tedius</author>
                                        <pubDate>Tue Nov 29, 2005 10:38 am</pubDate>
                                        <guid isPermaLink="true">http://www.linuxformat.com/forums/viewtopic.php?p=13112#13112</guid>
                                      </item>
                                      <item>
                                        <title>Re: [Solved] Mono and Sqlite</title>
                                        <link>http://www.linuxformat.com/forums/viewtopic.php?p=13063#13063</link>
                                        <description>&lt;br /&gt;
                                      Author: &lt;a href='http://www.linuxformat.com/forums/profile.php?mode=viewprofile&amp;u=148'&gt;tedius&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;
                                      Posted: Mon Nov 28, 2005 3:42 pm&lt;br /&gt;&lt;br /&gt;
                                      &lt;br /&gt;&lt;br /&gt;
                                      From what I have understand from the Mono and .NET documentation then the parameter substitution is happening before the sql is passed to Sqlite.  As for the other suggestion, I tried that and it had no effect.</description>
                                        <comments>http://www.linuxformat.com/forums/viewtopic.php?p=13063#13063</comments>
                                        <author>tedius</author>
                                        <pubDate>Mon Nov 28, 2005 3:42 pm</pubDate>
                                        <guid isPermaLink="true">http://www.linuxformat.com/forums/viewtopic.php?p=13063#13063</guid>
                                      </item>
                                      <item>
                                        <title>RE: Re: Mono and Sqlite</title>
                                        <link>http://www.linuxformat.com/forums/viewtopic.php?p=13060#13060</link>
                                        <description>&lt;br /&gt;
                                      Author: &lt;a href='http://www.linuxformat.com/forums/profile.php?mode=viewprofile&amp;u=3881'&gt;tommieb&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;
                                      Posted: Mon Nov 28, 2005 3:16 pm&lt;br /&gt;&lt;br /&gt;
                                      &lt;br /&gt;&lt;br /&gt;
                                      Oh yeah, I'd also guess you'd have to declare the parameters in the line that contains the SQL....INSERT INTO _table VALUES (@Param, @Val), from my mssql exp, the db manager would need to know what are the parameter typings for each of them...perhaps something like this - DECLARE @Param Text, DECLARE @Val Text prior to the INSERT sql?</description>
                                        <comments>http://www.linuxformat.com/forums/viewtopic.php?p=13060#13060</comments>
                                        <author>tommieb</author>
                                        <pubDate>Mon Nov 28, 2005 3:16 pm</pubDate>
                                        <guid isPermaLink="true">http://www.linuxformat.com/forums/viewtopic.php?p=13060#13060</guid>
                                      </item>
                                      <item>
                                        <title>RE: Re: Mono and Sqlite</title>
                                        <link>http://www.linuxformat.com/forums/viewtopic.php?p=13059#13059</link>
                                        <description>&lt;br /&gt;
                                      Author: &lt;a href='http://www.linuxformat.com/forums/profile.php?mode=viewprofile&amp;u=3881'&gt;tommieb&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;
                                      Posted: Mon Nov 28, 2005 3:12 pm&lt;br /&gt;&lt;br /&gt;
                                      &lt;br /&gt;&lt;br /&gt;
                                      Hmmm....have you tried taking out the @ from the param.ParameterName = &quot;@Param&quot;; line??&lt;br /&gt;
HTH,&lt;br /&gt;
Tom.</description>
                                        <comments>http://www.linuxformat.com/forums/viewtopic.php?p=13059#13059</comments>
                                        <author>tommieb</author>
                                        <pubDate>Mon Nov 28, 2005 3:12 pm</pubDate>
                                        <guid isPermaLink="true">http://www.linuxformat.com/forums/viewtopic.php?p=13059#13059</guid>
                                      </item>
                                      <item>
                                        <title>Re: Mono and Sqlite</title>
                                        <link>http://www.linuxformat.com/forums/viewtopic.php?p=13052#13052</link>
                                        <description>&lt;br /&gt;
                                      Author: &lt;a href='http://www.linuxformat.com/forums/profile.php?mode=viewprofile&amp;u=252'&gt;M-Saunders&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;
                                      Posted: Mon Nov 28, 2005 2:23 pm&lt;br /&gt;&lt;br /&gt;
                                      &lt;br /&gt;&lt;br /&gt;
                                      &lt;/span&gt;&lt;table width=&quot;90%&quot; cellspacing=&quot;1&quot; cellpadding=&quot;3&quot; border=&quot;0&quot; align=&quot;center&quot;&gt;&lt;tr&gt; 	  &lt;td&gt;&lt;span class=&quot;genmed&quot;&gt;&lt;b&gt;tedius wrote:&lt;/b&gt;&lt;/span&gt;&lt;/td&gt;	&lt;/tr&gt;	&lt;tr&gt;	  &lt;td class=&quot;quote&quot;&gt;Some one please help, as I'm pulling out my heir  &lt;img src=&quot;images/smiles/icon_confused.gif&quot; alt=&quot;Confused&quot; border=&quot;0&quot; /&gt;&lt;/td&gt;	&lt;/tr&gt;&lt;/table&gt;&lt;span class=&quot;postbody&quot;&gt;&lt;br /&gt;
&lt;br /&gt;
Hey, just because it won't run, doesn't mean you need to cut people out of your will.&lt;br /&gt;
&lt;br /&gt;
(Sorry. Had to do it.)&lt;br /&gt;
&lt;br /&gt;
M &lt;img src=&quot;images/smiles/icon_smile.gif&quot; alt=&quot;Smile&quot; border=&quot;0&quot; /&gt;</description>
                                        <comments>http://www.linuxformat.com/forums/viewtopic.php?p=13052#13052</comments>
                                        <author>M-Saunders</author>
                                        <pubDate>Mon Nov 28, 2005 2:23 pm</pubDate>
                                        <guid isPermaLink="true">http://www.linuxformat.com/forums/viewtopic.php?p=13052#13052</guid>
                                      </item>
                                      <item>
                                        <title>[Solved] Mono and Sqlite</title>
                                        <link>http://www.linuxformat.com/forums/viewtopic.php?p=13049#13049</link>
                                        <description>&lt;br /&gt;
                                      Author: &lt;a href='http://www.linuxformat.com/forums/profile.php?mode=viewprofile&amp;u=148'&gt;tedius&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;
                                      Posted: Mon Nov 28, 2005 2:11 pm&lt;br /&gt;&lt;br /&gt;
                                      &lt;br /&gt;&lt;br /&gt;
                                      I'm having some problems with a database application I'm writing in C# on mono.  To be more precise it is the SqliteParameter object that is causing me hassle.  &lt;br /&gt;
&lt;br /&gt;
This is a snippet of my code;&lt;br /&gt;
&lt;/span&gt;&lt;table width=&quot;90%&quot; cellspacing=&quot;1&quot; cellpadding=&quot;3&quot; border=&quot;0&quot; align=&quot;center&quot;&gt;&lt;tr&gt; 	  &lt;td&gt;&lt;span class=&quot;genmed&quot;&gt;&lt;b&gt;Code:&lt;/b&gt;&lt;/span&gt;&lt;/td&gt;	&lt;/tr&gt;	&lt;tr&gt;	  &lt;td class=&quot;code&quot;&gt;&amp;nbsp; &amp;nbsp; public static class Connection&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;#123;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; private static SqliteConnection mConn = null;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; public static bool Connect&amp;#40;string filename&amp;#41;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;#123;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if &amp;#40;mConn != null&amp;#41;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; mConn.Close&amp;#40;&amp;#41;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; string connString = &amp;quot;version=3,URI=file&amp;#58;&amp;quot; + filename;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; mConn = new SqliteConnection&amp;#40;connString&amp;#41;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return true;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;#125;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; public static void Create&amp;#40;&amp;#41;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;#123;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; string sql = @&amp;quot;CREATE TABLE _table&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;#40;param TEXT NOT NULL,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; value TEXT NOT NULL&amp;#41;;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; SqliteCommand cmd = new SqliteCommand&amp;#40;sql, mConn&amp;#41;;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // insert the default values&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Insert&amp;#40;&amp;quot;version&amp;quot;, mdVersion&amp;#41;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Insert&amp;#40;&amp;quot;ready&amp;quot;, true&amp;#41;;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;#125;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; private static void Insert&amp;#40;string var, object val&amp;#41;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;#123;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; string sql = &amp;quot;INSERT INTO _table VALUES &amp;#40;@Param, @Val&amp;#41;&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; SqliteCommand cmd = null;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; SqliteParameter param = null;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; try&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;#123;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; mConn.Open&amp;#40;&amp;#41;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; cmd = new SqliteCommand&amp;#40;sql, mConn&amp;#41;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; param = new SqliteParameter&amp;#40;&amp;#41;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; param.ParameterName = &amp;quot;@Param&amp;quot;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; param.Value = var;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; cmd.Parameters.Add&amp;#40;param&amp;#41;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; param = new SqliteParameter&amp;#40;&amp;#41;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; param.ParameterName = &amp;quot;@Val&amp;quot;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; param.Value = val.ToString&amp;#40;&amp;#41;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; cmd.Parameters.Add&amp;#40;param&amp;#41;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; cmd.ExecuteNonQuery&amp;#40;&amp;#41;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;#125;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; finally&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;#123;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if &amp;#40;cmd != null&amp;#41;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; cmd.Dispose&amp;#40;&amp;#41;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; mConn.Close&amp;#40;&amp;#41;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;#125;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;#125;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;#125;&lt;br /&gt;
&lt;/td&gt;	&lt;/tr&gt;&lt;/table&gt;&lt;span class=&quot;postbody&quot;&gt;&lt;br /&gt;
&lt;br /&gt;
Can any one see what I'm doing wrong with this.  When I run it I get the following error;&lt;br /&gt;
&lt;br /&gt;
&lt;/span&gt;&lt;table width=&quot;90%&quot; cellspacing=&quot;1&quot; cellpadding=&quot;3&quot; border=&quot;0&quot; align=&quot;center&quot;&gt;&lt;tr&gt; 	  &lt;td&gt;&lt;span class=&quot;genmed&quot;&gt;&lt;b&gt;Code:&lt;/b&gt;&lt;/span&gt;&lt;/td&gt;	&lt;/tr&gt;	&lt;tr&gt;	  &lt;td class=&quot;code&quot;&gt;Unhandled Exception&amp;#58; System.ApplicationException&amp;#58; unrecognized token&amp;#58; &amp;quot;@&amp;quot;&lt;br /&gt;
in &amp;lt;0x00186&amp;gt; Mono.Data.SqliteClient.SqliteCommand&amp;#58;Prepare &amp;#40;&amp;#41;&lt;br /&gt;
in &amp;lt;0x00085&amp;gt; Mono.Data.SqliteClient.SqliteCommand&amp;#58;ExecuteReader &amp;#40;CommandBehavior behavior, Boolean want_results, System.Int32 rows_affected&amp;#41;&lt;br /&gt;
in &amp;lt;0x00023&amp;gt; Mono.Data.SqliteClient.SqliteCommand&amp;#58;ExecuteNonQuery &amp;#40;&amp;#41;&lt;br /&gt;
in &amp;lt;0x001a9&amp;gt; PiggyBank.Database.Connection&amp;#58;Insert &amp;#40;System.String var, System.Object val&amp;#41;&lt;br /&gt;
in &amp;lt;0x00040&amp;gt; PiggyBank.Database.Connection&amp;#58;Create &amp;#40;&amp;#41;&lt;br /&gt;
in &amp;lt;0x00033&amp;gt; MainClass&amp;#58;Main &amp;#40;System.String&amp;#91;&amp;#93; args&amp;#41;&lt;/td&gt;	&lt;/tr&gt;&lt;/table&gt;&lt;span class=&quot;postbody&quot;&gt;&lt;br /&gt;
&lt;br /&gt;
Some one please help, as I'm pulling out my heir  &lt;img src=&quot;images/smiles/icon_confused.gif&quot; alt=&quot;Confused&quot; border=&quot;0&quot; /&gt;&lt;br /&gt;
&lt;br /&gt;
[edit] ups I mean hair  &lt;img src=&quot;images/smiles/icon_redface.gif&quot; alt=&quot;Embarassed&quot; border=&quot;0&quot; /&gt; [/edit]</description>
                                        <comments>http://www.linuxformat.com/forums/viewtopic.php?p=13049#13049</comments>
                                        <author>tedius</author>
                                        <pubDate>Mon Nov 28, 2005 2:11 pm</pubDate>
                                        <guid isPermaLink="true">http://www.linuxformat.com/forums/viewtopic.php?p=13049#13049</guid>
                                      </item></channel></rss>