<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: Lessons in SQL</title>
	<atom:link href="http://www.dailydoseofexcel.com/archives/2008/11/14/lessons-in-sql/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.dailydoseofexcel.com/archives/2008/11/14/lessons-in-sql/</link>
	<description>Daily posts of Excel tips…and other stuff</description>
	<lastBuildDate>Wed, 08 Feb 2012 23:58:05 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
	<item>
		<title>By: Dick Kusleika</title>
		<link>http://www.dailydoseofexcel.com/archives/2008/11/14/lessons-in-sql/#comment-36303</link>
		<dc:creator>Dick Kusleika</dc:creator>
		<pubDate>Fri, 05 Dec 2008 23:40:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=1911#comment-36303</guid>
		<description>&lt;p&gt;Jamie:  Good point.  None of the parameters in my app are exposed to the user, but that&#039;s not say they won&#039;t be in some future application.  It&#039;s good practice to use Paramter objects, so I think I&#039;ll start doing that.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Jamie:  Good point.  None of the parameters in my app are exposed to the user, but that&#8217;s not say they won&#8217;t be in some future application.  It&#8217;s good practice to use Paramter objects, so I think I&#8217;ll start doing that.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Brett</title>
		<link>http://www.dailydoseofexcel.com/archives/2008/11/14/lessons-in-sql/#comment-36128</link>
		<dc:creator>Brett</dc:creator>
		<pubDate>Tue, 18 Nov 2008 14:31:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=1911#comment-36128</guid>
		<description>&lt;p&gt;Totally FUN! Removing a hyphen solved the problem. However, some of the data has a double quote as part of the value, as well as some having a single quote. Anyone have a suggestion for a bullet-proof text indicator so I can wrap that around the cell value as it is read into the Access table?&lt;/p&gt;
&lt;p&gt;Brett&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Totally FUN! Removing a hyphen solved the problem. However, some of the data has a double quote as part of the value, as well as some having a single quote. Anyone have a suggestion for a bullet-proof text indicator so I can wrap that around the cell value as it is read into the Access table?</p>
<p>Brett</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Brett</title>
		<link>http://www.dailydoseofexcel.com/archives/2008/11/14/lessons-in-sql/#comment-36123</link>
		<dc:creator>Brett</dc:creator>
		<pubDate>Tue, 18 Nov 2008 02:43:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=1911#comment-36123</guid>
		<description>&lt;p&gt;Andy,&lt;/p&gt;
&lt;p&gt;     Thanks very much for the link, I&#039;m playing with the ADO flavor. It has been most timely. I can&#039;t find the secret to getting all my column names in as field names without a &quot;Syntax Eror in Make Table&quot; I get plenty of test tables made. The string is less than 256 characters. Any tips would be apreciated. It has been lots of fun to work with. &lt;/p&gt;
&lt;p&gt;Brett&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Andy,</p>
<p>     Thanks very much for the link, I&#8217;m playing with the ADO flavor. It has been most timely. I can&#8217;t find the secret to getting all my column names in as field names without a &#8220;Syntax Eror in Make Table&#8221; I get plenty of test tables made. The string is less than 256 characters. Any tips would be apreciated. It has been lots of fun to work with. </p>
<p>Brett</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jamie Collins</title>
		<link>http://www.dailydoseofexcel.com/archives/2008/11/14/lessons-in-sql/#comment-36113</link>
		<dc:creator>Jamie Collins</dc:creator>
		<pubDate>Mon, 17 Nov 2008 10:47:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=1911#comment-36113</guid>
		<description>&lt;p&gt;Dick, I don&#039;t know how your code is being used but, on the face of it, it has SQL injection issues (http://en.wikipedia.org/wiki/SQL_injection). Better IMO to use stored procs or prepared statements e.g. use ADODB.Paramter objects to strongly-type the (String) values passed and return a ADODB.Command object, rather than returning dynamic SQL text.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Dick, I don&#8217;t know how your code is being used but, on the face of it, it has SQL injection issues (<a href="http://en.wikipedia.org/wiki/SQL_injection" rel="nofollow">http://en.wikipedia.org/wiki/SQL_injection</a>). Better IMO to use stored procs or prepared statements e.g. use ADODB.Paramter objects to strongly-type the (String) values passed and return a ADODB.Command object, rather than returning dynamic SQL text.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jamie Collins</title>
		<link>http://www.dailydoseofexcel.com/archives/2008/11/14/lessons-in-sql/#comment-36112</link>
		<dc:creator>Jamie Collins</dc:creator>
		<pubDate>Mon, 17 Nov 2008 10:42:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=1911#comment-36112</guid>
		<description>&lt;p&gt;Shouldn&#039;t this be &#039;Lessons in Access&#039;? Your use of Nz() in VBA code is the giveaway :)&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Shouldn&#8217;t this be &#8216;Lessons in Access&#8217;? Your use of Nz() in VBA code is the giveaway <img src='http://www.dailydoseofexcel.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rob Bruce</title>
		<link>http://www.dailydoseofexcel.com/archives/2008/11/14/lessons-in-sql/#comment-36087</link>
		<dc:creator>Rob Bruce</dc:creator>
		<pubDate>Sat, 15 Nov 2008 15:01:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=1911#comment-36087</guid>
		<description>&lt;p&gt;I prefer to code param queries in Access or stored procs in SQLServer and not to build in-line SQL in code.&lt;/p&gt;
&lt;p&gt;Several years ago I had a class generator that I could point at a database table and it would build a class and collection that modelled the table. It wasn&#039;t perfect as it didn&#039;t understand autonumbers and sometimes got data types wrong, but it saved a lot of time and grunt-work. I lost it after I reformatted one time. The licensing no longer worked, and the developer had disappeared. Very frustrating.&lt;/p&gt;
&lt;p&gt;Rob&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>I prefer to code param queries in Access or stored procs in SQLServer and not to build in-line SQL in code.</p>
<p>Several years ago I had a class generator that I could point at a database table and it would build a class and collection that modelled the table. It wasn&#8217;t perfect as it didn&#8217;t understand autonumbers and sometimes got data types wrong, but it saved a lot of time and grunt-work. I lost it after I reformatted one time. The licensing no longer worked, and the developer had disappeared. Very frustrating.</p>
<p>Rob</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Andy Wiggins</title>
		<link>http://www.dailydoseofexcel.com/archives/2008/11/14/lessons-in-sql/#comment-36079</link>
		<dc:creator>Andy Wiggins</dc:creator>
		<pubDate>Sat, 15 Nov 2008 10:30:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=1911#comment-36079</guid>
		<description>&lt;p&gt;Anyone reading your posting and who is interested in getting to grips with SQL, Excel and Access, might find the following link of interest.&lt;/p&gt;
&lt;p&gt;&quot;Using SQL in VBA&quot; at&lt;br&gt;
&lt;a href=&quot;http://bygsoftware.com/Excel/SQL/UsingSql.html&quot; rel=&quot;nofollow&quot;&gt;http://bygsoftware.com/Excel/SQL/UsingSql.html&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;The code creates an Access database, creates a table, inserts records into the table, amends the records, deletes the records, deletes the table and, finally, deletes the database.&lt;/p&gt;
&lt;p&gt;In this one demonstration, you have the complete database lifecycle.&lt;/p&gt;
&lt;p&gt;There are two downloads associated with it: one for DAO and the other for ADO.&lt;/p&gt;
&lt;p&gt;I would make one comment about your code. SQL loves spaces and if you don&#039;t have spaces in the right places the code won&#039;t work. This caught me out a number of times  until I started putting a space at the beginning of each line so the code looks like this and you can eyeball it for sense:&lt;/p&gt;
&lt;p&gt;    vtSql = &quot;&quot;&lt;br&gt;
    vtSql = vtSql &amp; &quot; UPDATE LatestPrices&quot;&lt;br&gt;
    vtSql = vtSql &amp; &quot; SET &quot; &amp; aa &amp; &quot;=&quot; &amp;&lt;br&gt;
    vtSql = vtSql &amp; &quot; WHERE &quot; &amp; bb &amp; &quot;=&quot;&quot;&quot; &amp; xx &amp; &quot;&quot;&quot;&quot;&lt;/p&gt;
&lt;p&gt;Cheers&lt;br&gt;
Andy Wiggins&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Anyone reading your posting and who is interested in getting to grips with SQL, Excel and Access, might find the following link of interest.</p>
<p>&#8220;Using SQL in VBA&#8221; at<br />
<a href="http://bygsoftware.com/Excel/SQL/UsingSql.html" rel="nofollow">http://bygsoftware.com/Excel/SQL/UsingSql.html</a></p>
<p>The code creates an Access database, creates a table, inserts records into the table, amends the records, deletes the records, deletes the table and, finally, deletes the database.</p>
<p>In this one demonstration, you have the complete database lifecycle.</p>
<p>There are two downloads associated with it: one for DAO and the other for ADO.</p>
<p>I would make one comment about your code. SQL loves spaces and if you don&#8217;t have spaces in the right places the code won&#8217;t work. This caught me out a number of times  until I started putting a space at the beginning of each line so the code looks like this and you can eyeball it for sense:</p>
<p>    vtSql = &#8220;&#8221;<br />
    vtSql = vtSql &amp; &#8221; UPDATE LatestPrices&#8221;<br />
    vtSql = vtSql &amp; &#8221; SET &#8221; &amp; aa &amp; &#8220;=&#8221; &amp;<br />
    vtSql = vtSql &amp; &#8221; WHERE &#8221; &amp; bb &amp; &#8220;=&#8221;"&#8221; &amp; xx &amp; &#8220;&#8221;"&#8221;</p>
<p>Cheers<br />
Andy Wiggins</p>
]]></content:encoded>
	</item>
</channel>
</rss>

