<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Mukesh Chapagain&#039;s Blog &#187; ms-sql</title>
	<atom:link href="http://blog.chapagain.com.np/tag/ms-sql/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.chapagain.com.np</link>
	<description>PHP Magento jQuery SQL Wordpress Joomla Programming &#38; Tutorial</description>
	<lastBuildDate>Tue, 07 Feb 2012 00:54:41 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.3</generator>
		<item>
		<title>SQL Error: Cannot insert the value NULL into column&#8230; column does not allow nulls. INSERT fails.</title>
		<link>http://blog.chapagain.com.np/sql-error-cannot-insert-the-value-null-into-column-column-does-not-allow-nulls-insert-fails/</link>
		<comments>http://blog.chapagain.com.np/sql-error-cannot-insert-the-value-null-into-column-column-does-not-allow-nulls-insert-fails/#comments</comments>
		<pubDate>Wed, 11 Mar 2009 11:20:19 +0000</pubDate>
		<dc:creator>Mukesh</dc:creator>
				<category><![CDATA[Database]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[error]]></category>
		<category><![CDATA[ms-sql]]></category>
		<category><![CDATA[problem]]></category>
		<category><![CDATA[query]]></category>

		<guid isPermaLink="false">http://blog.chapagain.com.np/?p=107</guid>
		<description><![CDATA[Error description: Cannot insert the value NULL into column &#8216;SourceId&#8217;, table &#8216;Advisory.dbo.AdvDocSource&#8217;; column does not allow nulls. INSERT fails. The statement has been terminated. The &#8216;CompanyAdd&#8217; procedure attempted to return a status of NULL, which is not allowed. A status of 0 will be returned instead. &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;- This error occurs because the &#8216;SourceId&#8217; column in [...]


<strong>Related posts:</strong><ol><li><a href='http://blog.chapagain.com.np/alter-mysql-table-to-add-drop-column-add-foreign-key/' rel='bookmark' title='Permanent Link: Alter MySQL table to add &#038; drop column &#038; add Foreign Key'>Alter MySQL table to add &#038; drop column &#038; add Foreign Key</a></li>
<li><a href='http://blog.chapagain.com.np/magento-how-to-select-insert-update-and-delete-data/' rel='bookmark' title='Permanent Link: Magento: How to select, insert, update, and delete data?'>Magento: How to select, insert, update, and delete data?</a></li>
<li><a href='http://blog.chapagain.com.np/very-useful-sql-queries-with-joins/' rel='bookmark' title='Permanent Link: 10 Very Useful SQL Queries with JOINS'>10 Very Useful SQL Queries with JOINS</a></li>
<li><a href='http://blog.chapagain.com.np/mysql-database-foreign-key-understanding-and-implementation/' rel='bookmark' title='Permanent Link: MySQL Database: Foreign Key Understanding and Implementation'>MySQL Database: Foreign Key Understanding and Implementation</a></li>
<li><a href='http://blog.chapagain.com.np/displaying-all-products-and-new-products-listing-in-columngrid-layout-zen-cart/' rel='bookmark' title='Permanent Link: Displaying all products and new products listing in column/grid layout &#8211; Zen-cart'>Displaying all products and new products listing in column/grid layout &#8211; Zen-cart</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p style="text-align: justify;">Error description:</p>
<p style="text-align: justify;">Cannot insert the value NULL into column &#8216;SourceId&#8217;, table &#8216;Advisory.dbo.AdvDocSource&#8217;; column does not allow nulls. INSERT fails.<br />
The statement has been terminated. The &#8216;CompanyAdd&#8217; procedure attempted to return a status of NULL, which is not allowed. A status of 0 will be returned instead.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-</p>
<p style="text-align: justify;">This error occurs because the &#8216;SourceId&#8217; column in my table is primary key and it is set to not null. i.e. it doesn&#8217;t allow null entries. And I have not made it auto increment.</p>
<p><span id="more-107"></span></p>
<p>For making a table column auto increment:<br />
- Go to server explorer.<br />
- In Column Properties, go to Identity Specification.<br />
- Go to (Is Identity) and make it &#8216;Yes&#8217; from the selection list.</p>
<p>You are done. You also have the option for Identity Increment and Identity Seed.</p>
<p>The SQL Query is:<br />
CREATE TABLE [yourTableName](SourceID int IDENTITY(1,1) NOT NULL, &#8230;</p>
<hr /><small>Copyright &copy; 2011<br /> This feed is for personal, non-commercial use only. <br /> The use of this feed on other websites breaches copyright. If this content is not in your news reader, it makes the page you are viewing an infringement of the copyright. (Digital Fingerprint:<br /> )</small><img src="http://blog.chapagain.com.np/?ak_action=api_record_view&id=107&type=feed" alt="" />

<p><strong>Related posts:</strong><ol><li><a href='http://blog.chapagain.com.np/alter-mysql-table-to-add-drop-column-add-foreign-key/' rel='bookmark' title='Permanent Link: Alter MySQL table to add &#038; drop column &#038; add Foreign Key'>Alter MySQL table to add &#038; drop column &#038; add Foreign Key</a></li>
<li><a href='http://blog.chapagain.com.np/magento-how-to-select-insert-update-and-delete-data/' rel='bookmark' title='Permanent Link: Magento: How to select, insert, update, and delete data?'>Magento: How to select, insert, update, and delete data?</a></li>
<li><a href='http://blog.chapagain.com.np/very-useful-sql-queries-with-joins/' rel='bookmark' title='Permanent Link: 10 Very Useful SQL Queries with JOINS'>10 Very Useful SQL Queries with JOINS</a></li>
<li><a href='http://blog.chapagain.com.np/mysql-database-foreign-key-understanding-and-implementation/' rel='bookmark' title='Permanent Link: MySQL Database: Foreign Key Understanding and Implementation'>MySQL Database: Foreign Key Understanding and Implementation</a></li>
<li><a href='http://blog.chapagain.com.np/displaying-all-products-and-new-products-listing-in-columngrid-layout-zen-cart/' rel='bookmark' title='Permanent Link: Displaying all products and new products listing in column/grid layout &#8211; Zen-cart'>Displaying all products and new products listing in column/grid layout &#8211; Zen-cart</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://blog.chapagain.com.np/sql-error-cannot-insert-the-value-null-into-column-column-does-not-allow-nulls-insert-fails/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
<!-- WP Super Cache is installed but broken. The path to wp-cache-phase1.php in wp-content/advanced-cache.php must be fixed! -->
