<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://www.infopathdev.com:443/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Code</title><link>https://www.infopathdev.com:443/forums/45.aspx</link><description /><dc:language>en</dc:language><generator>CommunityServer 2007 SP3 (Build: 31118.962)</generator><item><title>Re: Error while saving a value</title><link>https://www.infopathdev.com:443/forums/thread/53756.aspx</link><pubDate>Fri, 16 Apr 2010 06:06:32 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:53756</guid><dc:creator>alexia_net</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/53756.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=53756</wfw:commentRss><description>&lt;p&gt;&amp;nbsp;Hi. The solution is simple but very strange. I have to convert the integer into string and then i can save it into the database, in a field which is integer. LOL! Thank you for your help anyway.&lt;br /&gt;&lt;/p&gt;</description></item><item><title>Re: Error while saving a value</title><link>https://www.infopathdev.com:443/forums/thread/53724.aspx</link><pubDate>Thu, 15 Apr 2010 13:39:58 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:53724</guid><dc:creator>alexia_net</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/53724.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=53724</wfw:commentRss><description>&lt;p&gt;&amp;nbsp;Hi. Thank you for your reply. I have even changed the database fields to decimal (from both tables where the primary key resides and in the one where it migrates). I am using sql server 2008 express as database; i have no double there to choose. The same problem. If it is text it works but i cannot use autoincrement on the primary key, and this is something i do not have to loose. I need that autoincrement proprety for the table where userId is primary key. Thank you!&lt;br /&gt;&lt;/p&gt;</description></item><item><title>Re: Error while saving a value</title><link>https://www.infopathdev.com:443/forums/thread/53723.aspx</link><pubDate>Thu, 15 Apr 2010 13:31:02 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:53723</guid><dc:creator>Qazi Anis</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/53723.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=53723</wfw:commentRss><description>&lt;p&gt;try converting m_userId to double&lt;/p&gt;
&lt;p&gt;Convert.ToDouble (m_userId)&lt;/p&gt;</description></item><item><title>Error while saving a value</title><link>https://www.infopathdev.com:443/forums/thread/53721.aspx</link><pubDate>Thu, 15 Apr 2010 13:17:53 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:53721</guid><dc:creator>alexia_net</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/53721.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=53721</wfw:commentRss><description>&lt;p&gt;Hi. I am having the fillowing code&lt;/p&gt;&lt;p&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;nbsp;&amp;nbsp;&amp;nbsp; m_cmdSqlCommand = New SqlCommand(&amp;quot;INSERT INTO Comments(userId) VALUES(&amp;#39;&amp;quot; + m_userId + &amp;quot;&amp;#39;)&amp;quot;, m_conSqlConnection)&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;nbsp;&amp;nbsp;&amp;nbsp; m_drDataReader = m_cmdSqlCommand.ExecuteReader&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;nbsp;&amp;nbsp;&amp;nbsp; m_drDataReader.Close()&lt;/p&gt;&lt;p&gt;The strange thing is that I get an error saying&lt;/p&gt;&lt;p&gt;&amp;quot;Convertion from string &amp;quot;INSERT INTO Comments(userId)...&amp;quot; to type double is not vallid.&lt;/p&gt;&lt;p&gt;Now, userId is a key comming from the User table, and it is Int not Double. The Cascade option is not enabled. The value which I am trying to save is int, from variable&lt;/p&gt;&lt;p&gt;m_userId = m_dtBuilding.Rows(m_rowPosition)(&amp;quot;userId&amp;quot;)&lt;/p&gt;&lt;p&gt;Does anyone know why I get this error? Thank you! &lt;br /&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item></channel></rss>