<?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: Create Mdb Tables in VBA</title>
	<atom:link href="http://www.dailydoseofexcel.com/archives/2006/01/21/create-mdb-tables-in-vba/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.dailydoseofexcel.com/archives/2006/01/21/create-mdb-tables-in-vba/</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: Steven M. Britton</title>
		<link>http://www.dailydoseofexcel.com/archives/2006/01/21/create-mdb-tables-in-vba/#comment-18417</link>
		<dc:creator>Steven M. Britton</dc:creator>
		<pubDate>Tue, 24 Jan 2006 20:59:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=1318#comment-18417</guid>
		<description>&lt;p&gt;Hey Dick,&lt;/p&gt;
&lt;p&gt;I have been fiddling with something similar.  Now I&#039;m not as good at this stuff as the rest of you, but I think this might help.  The whole making a SQL statement to do an INSERT INTO the Access table doesn&#039;t seem to be the fastest/cleanest method.  I recently changed how I getting the data from Excel into Access.  &lt;/p&gt;
&lt;p&gt;I don&#039;t know how to use ADO (yet) so I have DAO in my code but this is the short of it here.  What I&#039;ve done is CREATED the table which I know the field types I want and the total number of fields.  Let me know what you think and if you need more info.&lt;/p&gt;
&lt;p&gt;    Set rs = db.OpenRecordset(&quot;tblDMLifeCycle&quot;)&lt;/p&gt;
&lt;p&gt;   Do&lt;br&gt;
        &#039;Insert data into the table&lt;br&gt;
        intCount = 1&lt;br&gt;
        &#039;Load Array with values from Excel&lt;br&gt;
        For i = 0 To 37&lt;br&gt;
            varExcelInfo(i) = Application.Cells(intRcount, intCount)&lt;br&gt;
            intCount = intCount + 1&lt;br&gt;
        Next&lt;/p&gt;
&lt;p&gt;        rs.AddNew&lt;br&gt;
        &#039;Take values from Excel Array and plug into Access table.&lt;br&gt;
        For i = 0 To 37&lt;br&gt;
            rs.Fields(i) = varExcelInfo(i)&lt;br&gt;
        Next&lt;/p&gt;
&lt;p&gt;        rs.Update&lt;br&gt;
        &#039;Move down Excel workbook.&lt;br&gt;
        intRcount = intRcount + 1&lt;br&gt;
        Erase varExcelInfo()&lt;br&gt;
    Loop Until intRcount &gt; End_Row&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Hey Dick,</p>
<p>I have been fiddling with something similar.  Now I&#8217;m not as good at this stuff as the rest of you, but I think this might help.  The whole making a SQL statement to do an INSERT INTO the Access table doesn&#8217;t seem to be the fastest/cleanest method.  I recently changed how I getting the data from Excel into Access.  </p>
<p>I don&#8217;t know how to use ADO (yet) so I have DAO in my code but this is the short of it here.  What I&#8217;ve done is CREATED the table which I know the field types I want and the total number of fields.  Let me know what you think and if you need more info.</p>
<p>    Set rs = db.OpenRecordset(&#8220;tblDMLifeCycle&#8221;)</p>
<p>   Do<br />
        &#8216;Insert data into the table<br />
        intCount = 1<br />
        &#8216;Load Array with values from Excel<br />
        For i = 0 To 37<br />
            varExcelInfo(i) = Application.Cells(intRcount, intCount)<br />
            intCount = intCount + 1<br />
        Next</p>
<p>        rs.AddNew<br />
        &#8216;Take values from Excel Array and plug into Access table.<br />
        For i = 0 To 37<br />
            rs.Fields(i) = varExcelInfo(i)<br />
        Next</p>
<p>        rs.Update<br />
        &#8216;Move down Excel workbook.<br />
        intRcount = intRcount + 1<br />
        Erase varExcelInfo()<br />
    Loop Until intRcount &gt; End_Row</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tushar Mehta</title>
		<link>http://www.dailydoseofexcel.com/archives/2006/01/21/create-mdb-tables-in-vba/#comment-18383</link>
		<dc:creator>Tushar Mehta</dc:creator>
		<pubDate>Sun, 22 Jan 2006 02:38:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=1318#comment-18383</guid>
		<description>&lt;p&gt;Hi Dick,&lt;br&gt;
Maybe the reason you were experimenting with this topic was the same as...&lt;/p&gt;
&lt;p&gt;While spending way too much time on the code to deal with duplicates in multiple arrays, the one nagging thought I couldn&#039;t escape was that the entire process was a major waste of time -- other than being an interesting intellectual exercise.&lt;/p&gt;
&lt;p&gt;The easiest way to eliminate dups on a large scale would be to create a new table in a new db with just one field designated as &#039;no duplicates&#039;.  Now, just add all the data in all the different arrays into this table, skip errors and you have the necessary solution.  Very scalable in that it would work not only with in-memory arrays but also files!&lt;/p&gt;
&lt;p&gt;To put data back into the original sources, one would need a 2nd column in the table indicating the original source.&lt;/p&gt;
&lt;p&gt;It wouldn&#039;t have the rebalance capability in the code I posted to the NG but it would be much more scalable -- and easier to write. {grin}&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Hi Dick,<br />
Maybe the reason you were experimenting with this topic was the same as&#8230;</p>
<p>While spending way too much time on the code to deal with duplicates in multiple arrays, the one nagging thought I couldn&#8217;t escape was that the entire process was a major waste of time &#8212; other than being an interesting intellectual exercise.</p>
<p>The easiest way to eliminate dups on a large scale would be to create a new table in a new db with just one field designated as &#8216;no duplicates&#8217;.  Now, just add all the data in all the different arrays into this table, skip errors and you have the necessary solution.  Very scalable in that it would work not only with in-memory arrays but also files!</p>
<p>To put data back into the original sources, one would need a 2nd column in the table indicating the original source.</p>
<p>It wouldn&#8217;t have the rebalance capability in the code I posted to the NG but it would be much more scalable &#8212; and easier to write. {grin}</p>
]]></content:encoded>
	</item>
</channel>
</rss>

