<?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>Aaron Jefferson Villanueva&#039;s Blog Site&#187; Database</title>
	<atom:link href="http://malebolgia.shadowsonawall.net/category/code-programming/database/feed" rel="self" type="application/rss+xml" />
	<link>http://malebolgia.shadowsonawall.net</link>
	<description>Programming / Designing Blogging from windows to mac.</description>
	<lastBuildDate>Fri, 06 Aug 2010 02:40:24 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Cannot Create MSSQL Database.</title>
		<link>http://malebolgia.shadowsonawall.net/code-programming/database/mssql/file-path-is-compressed-cannot-create-mssql-database.html</link>
		<comments>http://malebolgia.shadowsonawall.net/code-programming/database/mssql/file-path-is-compressed-cannot-create-mssql-database.html#comments</comments>
		<pubDate>Sat, 01 May 2010 21:38:15 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[MSSQL]]></category>
		<category><![CDATA[compression]]></category>
		<category><![CDATA[MSSQL Server 2008]]></category>

		<guid isPermaLink="false">http://malebolgia.shadowsonawall.net/?p=275</guid>
		<description><![CDATA[
File Path is compressed Cannot Create MSSQL Database.  
While trying to add Database which I want to name "SimpleCMS" to MSSQL server and trying to put it under App_Data folder, I encountered this error.



Error Details:An exception occured while executing a Transact-SQL statement or batch.(Microsoft.SqlServer.ConnectionInfo)The file "you mssql db path here" is compressed but does [...]]]></description>
			<content:encoded><![CDATA[<p>
<strong>File Path is compressed Cannot Create MSSQL Database.</strong> <br /> <br />
While trying to add Database which I want to name "<em><span style="color: #008000;">SimpleCMS</span></em>" to MSSQL server and trying to put it under <strong><span style="color: #ff9900;">App_Data</span></strong> folder, I encountered this error.<br /><br />

<div style="background-color:#C00;">
<br />
<span style="color: #FFF;">Error Details:<br />An exception occured while executing a Transact-SQL statement or batch.<br />(Microsoft.SqlServer.ConnectionInfo)<br /><br />The file "you mssql db path here" is compressed but does not reside in a read-only database or filegroup. The file must be decompressed. CREATE DATABASE failed. Some file names listed could not be created. Check related errors.<br />...</span>
</div>

<br />
<img title="MSSQL Error Message" src="http://malebolgia.shadowsonawall.net/images/mssql/01.png" alt="Cannot Create Database"  /> 
<br />

<br /><br />Most cases this was cause that the Project folder is <span style="color: #993300;"><strong>inside a compressed drive or under a compressed folder</strong></span>, which will save space for your drive.<br /><br /><strong><span style="color: #808000;">I just want to share how I resolved this.</span></strong><br /><br />
<em>Note:</em> That You can uncompressed only the Project folder and leave other compressed.<br />
<br />I'm using <strong><span style="color: #003366;">windows XP </span></strong>so what I did was <br />1.) Right Click on the folder (Project Folder) in General Tab &gt; Click Advanced<br />2.) Under Compress or Encrypt attributes<br />3.) uncheck "Compress Contents to save disk space"<br />

<br />
<a title="Compress and Encrypt Attributes" rel="rokzoom[mssql]" href="http://malebolgia.shadowsonawall.net/images/mssql/02.png">
<img title="Compression" src="http://malebolgia.shadowsonawall.net/images/mssql/02_small.png" alt="Compression"  /> 
</a>
<br />

<br />From here I can now add the database "<span style="color: #008000;"><em>SimpleCMS</em></span>" under the <span style="color: #ff9900;"><strong>App_Folder</strong></span> inside the Project Folder.
<br /><br />
<img title="Database Added" src="http://malebolgia.shadowsonawall.net/images/mssql/worked.png" alt="Database Added"  /> 

<br /><br />

</p>]]></content:encoded>
			<wfw:commentRss>http://malebolgia.shadowsonawall.net/code-programming/database/mssql/file-path-is-compressed-cannot-create-mssql-database.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
<enclosure url="1" length="" type="" />
		</item>
		<item>
		<title>Cake Baking Models &#8211; Cannot see other tables</title>
		<link>http://malebolgia.shadowsonawall.net/code-programming/cake-baking-models-cannot-see-other-tables.html</link>
		<comments>http://malebolgia.shadowsonawall.net/code-programming/cake-baking-models-cannot-see-other-tables.html#comments</comments>
		<pubDate>Sun, 08 Nov 2009 02:57:17 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[CakePHP]]></category>
		<category><![CDATA[Coding/Programming]]></category>
		<category><![CDATA[Database]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[cache]]></category>
		<category><![CDATA[model]]></category>
		<category><![CDATA[tabke]]></category>

		<guid isPermaLink="false">http://malebolgia.shadowsonawall.net/?p=131</guid>
		<description><![CDATA[
Problem.After I updated the database, I added 1 table; relate it to another table, and go to the command line to bake what I did, after typing "cake bake model" at the command prompt, I found out that the recently added table was not listed.

&#160;
Reason.Cake caches your model schema. Solution.1.) Clear your cache by deleting all files [...]]]></description>
			<content:encoded><![CDATA[
<p><strong><span style="color: #ff0000;">Problem.</span></strong><br />After I updated the database, I added 1 table; relate it to another table, and go to the command line to bake what I did, after typing "<span style="color: #993300;"><em>cake bake model</em></span>" at the command prompt, I found out that the recently added table was not listed.</p>
<p><a href="http://malebolgia.shadowsonawall.net/wp-content/uploads/2009/11/cake-table-large.jpg"><img class="size-full wp-image-130" title="Cake PHP Bake Model Problem" src="http://malebolgia.shadowsonawall.net/wp-content/uploads/2009/11/cake-table-smal.jpg" alt="Cake PHP Bake Model Problem" width="200" height="101" /></a></p>
<p>&nbsp;</p>
<p><strong><span style="color: #800000;">Reason.</span></strong><br />Cake caches your model schema. <br /><br /><strong><span style="color: #99cc00;">Solution.</span></strong><br />1.) <br />Clear your cache by deleting all files in your app's <strong><span style="color: #333300;"><span style="text-decoration: underline;">tmp/cache/models/</span></span></strong> <br /><span style="color: #333300;"><strong><span style="text-decoration: underline;">and tmp/cache/persistent/</span></strong></span><br /><br />2.) <br />Disable caching in your app's config/core.php // make sure to enable back again in production setup</p>


<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #009933; font-style: italic;">/**
 * Turn off all caching application-wide.  *  
 */</span>  
Configure<span style="color: #339933;">::</span><span style="color: #004000;">write</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Cache.disable'</span><span style="color: #339933;">,</span> <span style="color: #009900; font-weight: bold;">true</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>



<p>After doing the solution, I can now successfully bake the new table.</p>
]]></content:encoded>
			<wfw:commentRss>http://malebolgia.shadowsonawall.net/code-programming/cake-baking-models-cannot-see-other-tables.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Saving changes is not permitted</title>
		<link>http://malebolgia.shadowsonawall.net/code-programming/database/saving-changes-is-not-permitted.html</link>
		<comments>http://malebolgia.shadowsonawall.net/code-programming/database/saving-changes-is-not-permitted.html#comments</comments>
		<pubDate>Sun, 14 Jun 2009 18:04:31 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Database]]></category>
		<category><![CDATA[MSSQL]]></category>
		<category><![CDATA[Modifying Table]]></category>
		<category><![CDATA[SQL Server 2008]]></category>

		<guid isPermaLink="false">http://malebolgia.shadowsonawall.net/?p=260</guid>
		<description><![CDATA[SQL Server 2008 Error: Saving changes is not permitted 

While Trying to update a table inside the database I'm working on(Which will happen alot of course), when I tried to save it... I encounter this annoying error. 

Saving changes is not permitted. The changes you have made require the following tables to be dropped and [...]]]></description>
			<content:encoded><![CDATA[<p><strong><span style="color: #808000;">SQL Server 2008 Error: Saving changes is not permitted</span></strong></p> <br />

<p>While Trying to update a table inside the database I'm working on(<span style="color: #ff0000;">Which will happen alot of course</span>), when I tried to save it... I encounter this annoying error.</p> <br />

<p><em>Saving changes is not permitted. The changes you have made require the following tables to be dropped and re-created.  You have either made changes to a table that can’t be re-created or enabled the option Prevent saving changes that require the table to be re-created.</em></p> <br />

<p>So I tried to<a href="http://lmgtfy.com/?q=SQL+Server+2008+Error%3A+Saving+changes+is+not+permitted" target="_blank"> Google</a> the Problem... and the solution was quite simple.</p><br />

<p><a href="http://www.danrigsby.com/blog/index.php/2008/09/26/sql-server-2008-error-saving-changes-is-not-permitted" target="_blank">http://www.danrigsby.com/blog/index.php/2008/09/26/sql-server-2008-error-saving-changes-is-not-permitted</a>/</p>
]]></content:encoded>
			<wfw:commentRss>http://malebolgia.shadowsonawall.net/code-programming/database/saving-changes-is-not-permitted.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
<enclosure url="1" length="" type="" />
		</item>
		<item>
		<title>Right way to use sql&#8230;</title>
		<link>http://malebolgia.shadowsonawall.net/code-programming/right-way-to-use-sql-join-with-conditions-displaying-no-match-data.html</link>
		<comments>http://malebolgia.shadowsonawall.net/code-programming/right-way-to-use-sql-join-with-conditions-displaying-no-match-data.html#comments</comments>
		<pubDate>Tue, 03 Mar 2009 07:27:20 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Coding/Programming]]></category>
		<category><![CDATA[Database]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[MySql Join query]]></category>

		<guid isPermaLink="false">http://malebolgia.shadowsonawall.net/?p=55</guid>
		<description><![CDATA[Right way to use sql join with conditions (Displaying no match data). 

After hours trying to figure out what's wrong with my query for displaying list of cities with how many Lease/Sale were there. The problem was getting the cities even not yet added on Lease or Sale type, that means I need to list [...]]]></description>
			<content:encoded><![CDATA[<strong>Right way to use sql join with conditions (Displaying no match data). </strong><br />

After hours trying to figure out what's wrong with my query for displaying list of cities with how many Lease/Sale were there. The problem was getting the cities even not yet added on Lease or Sale type, that means I need to list cities that has no match yet or 0 count. <br /><br />


<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?</span>
<span style="color: #000000; font-weight: bold;">global</span> <span style="color: #000088;">$mainframe</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$ebconfig</span> <span style="color: #339933;">=</span> <span style="color: #339933;">&amp;</span><span style="color: #000088;">$mainframe</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getParams</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$prop_Type</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$ebconfig</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">get</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'prop_type'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;Lease&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
&nbsp;
<span style="color: #000088;">$db_city</span> <span style="color: #339933;">=&amp;</span> JFactory<span style="color: #339933;">::</span><span style="color: #004000;">getDBO</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$query_city</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;SELECT t1.city, t1.id, COUNT( t2.propCity ) AS city_count
FROM #__listing_city AS t1
LEFT OUTER JOIN #__listing_listings AS t2 ON t2.propCity = t1.city
WHERE t2.propType = '<span style="color: #006699; font-weight: bold;">$prop_Type</span>' AND t2.published = 1
GROUP BY t1.city
ORDER BY t1.city ASC&quot;</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></td></tr></table></div>



<br /><br />
The code above does not display the cities that has no match on another table. The where clause was giving the problem...
<br />


<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?</span>
<span style="color: #000000; font-weight: bold;">global</span> <span style="color: #000088;">$mainframe</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$ebconfig</span> <span style="color: #339933;">=</span> <span style="color: #339933;">&amp;</span><span style="color: #000088;">$mainframe</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getParams</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$prop_Type</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$ebconfig</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">get</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'prop_type'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;Lease&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
&nbsp;
<span style="color: #000088;">$db_city</span> <span style="color: #339933;">=&amp;</span> JFactory<span style="color: #339933;">::</span><span style="color: #004000;">getDBO</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$query_city</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;SELECT t1.city, t1.id, COUNT( t2.propCity ) AS city_count
FROM #__listing_city AS t1
LEFT OUTER JOIN #__listing_listings AS t2 ON t2.propCity = t1.city
AND t2.published = 1 AND t2.propType = '<span style="color: #006699; font-weight: bold;">$prop_Type</span>'
GROUP BY t1.city
ORDER BY t1.city ASC&quot;</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></td></tr></table></div>




<br /><br />

Instead putting the condition on "ON Clause" after the matching table condition, fixed the problem.]]></content:encoded>
			<wfw:commentRss>http://malebolgia.shadowsonawall.net/code-programming/right-way-to-use-sql-join-with-conditions-displaying-no-match-data.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MySQL Delete Duplicate Entries</title>
		<link>http://malebolgia.shadowsonawall.net/code-programming/18.html</link>
		<comments>http://malebolgia.shadowsonawall.net/code-programming/18.html#comments</comments>
		<pubDate>Thu, 19 Oct 2006 13:55:04 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Coding/Programming]]></category>
		<category><![CDATA[Database]]></category>
		<category><![CDATA[MySQL]]></category>

		<guid isPermaLink="false">http://malebolgia.shadowsonawall.net/?p=18</guid>
		<description><![CDATA[This Is the Best way to delete duplicate entries in MySQL
alter ignore table table_name add unique index(column_name);
For example your table_name.column_name has &#8220;some&#8221; duplicate entries the best way to do is to put unique index on the column_name that has duplicates
Is that simple.
]]></description>
			<content:encoded><![CDATA[<p>This Is the Best way to delete duplicate entries in MySQL</p>
<p>alter ignore table <em>table_name</em> add unique index(<em>column_name</em>);</p>
<p>For example your table_name.column_name has &#8220;some&#8221; duplicate entries the best way to do is to put unique index on the column_name that has duplicates</p>
<p>Is that simple.</p>
]]></content:encoded>
			<wfw:commentRss>http://malebolgia.shadowsonawall.net/code-programming/18.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
