<?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>nandeshwar.info &#187; ODBC</title>
	<atom:link href="http://nandeshwar.info/tag/odbc/feed/" rel="self" type="application/rss+xml" />
	<link>http://nandeshwar.info</link>
	<description></description>
	<lastBuildDate>Mon, 12 Dec 2011 21:33:19 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
		<item>
		<title>Linked Table Query Returning Incorrect Results</title>
		<link>http://nandeshwar.info/2010/08/18/linked-table-query-returning-incorrect-results/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=linked-table-query-returning-incorrect-results</link>
		<comments>http://nandeshwar.info/2010/08/18/linked-table-query-returning-incorrect-results/#comments</comments>
		<pubDate>Wed, 18 Aug 2010 19:24:47 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Access]]></category>
		<category><![CDATA[error]]></category>
		<category><![CDATA[linked tables]]></category>
		<category><![CDATA[ODBC]]></category>
		<category><![CDATA[SQL server]]></category>

		<guid isPermaLink="false">http://nandeshwar.info/?p=325</guid>
		<description><![CDATA[We had this annoying problem: a simple query in Access to a linked table (using ODBC and MS SQL server) returned incorrect results, though the same query returned correct results in MS SQL server. By incorrect I mean the field values were different, so rather than returning AZ, the query returned BZ (some other value [...]]]></description>
			<content:encoded><![CDATA[<p>We had this annoying problem: a simple query in Access to a linked table (using ODBC and MS SQL server) returned incorrect results, though the same query returned correct results in MS SQL server. By incorrect I mean the field values were different, so rather than returning AZ, the query returned BZ (some other value in that field).</p>
<p>We thought that it was a table size issue, may be the driver could not handle huge data. However, the problem was with the &#8220;unique record identifier&#8221; while linking the table, as JM reported <a href="http://bytes.com/topic/access/answers/209274-simple-query-linked-odbc-table-gives-wrong-results">here</a>. I did not have this problem any longer when I did not select any fields for the unique record identifier while linking the table.</p>
]]></content:encoded>
			<wfw:commentRss>http://nandeshwar.info/2010/08/18/linked-table-query-returning-incorrect-results/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Access VBA: Export Access tables using ODBC</title>
		<link>http://nandeshwar.info/2007/07/18/access-vba-export-access-tables-using-odbc/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=access-vba-export-access-tables-using-odbc</link>
		<comments>http://nandeshwar.info/2007/07/18/access-vba-export-access-tables-using-odbc/#comments</comments>
		<pubDate>Wed, 18 Jul 2007 20:28:00 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Access]]></category>
		<category><![CDATA[Useful Procedures]]></category>
		<category><![CDATA[ODBC]]></category>
		<category><![CDATA[VBA]]></category>

		<guid isPermaLink="false">http://a7n9.wordpress.com/2007/07/18/access-vba-export-access-tables-using-odbc/</guid>
		<description><![CDATA[If you want to export Access tables using ODBC/DSN connections, use the following code. This procedure uses the File DSN and ODBC connection to export Access tables using DAO object TableDef. Sub ExportTbls() Dim sTblNm As String Dim sTypExprt As String Dim sCnxnStr As String, vStTime As Variant Dim db As Database, tbldef As DAO.TableDef [...]]]></description>
			<content:encoded><![CDATA[<p>If you want to export Access tables using ODBC/DSN connections, use the following code. This procedure uses the File DSN and ODBC connection to export Access tables using DAO object TableDef.</p>
<div id="code"><span style="font-family: Courier;"><span style="color:#00007F;">Sub</span> ExportTbls()</span></p>
<p><span style="color:#00007F;"><span style="font-family: Courier;">Dim</span></span><span style="font-family: Courier;"> sTblNm <span style="color:#00007F;">As</span> <span style="color:#00007F;">String</span><br />
<span style="color:#00007F;">Dim</span> sTypExprt <span style="color:#00007F;">As</span> <span style="color:#00007F;">String</span><br />
<span style="color:#00007F;">Dim</span> sCnxnStr  <span style="color:#00007F;">As</span> <span style="color:#00007F;">String</span>, vStTime <span style="color:#00007F;">As</span> <span style="color:#00007F;">Variant</span><br />
<span style="color:#00007F;">Dim</span> db <span style="color:#00007F;">As</span> Database, tbldef <span style="color:#00007F;">As</span> DAO.TableDef</span></p>
<p><span style="color:#00007F;"><span style="font-family: Courier;">On</span></span><span style="font-family: Courier;"> <span style="color:#00007F;">Error</span> <span style="color:#00007F;">GoTo</span> ExportTbls_Error</span></p>
<p><span style="font-family: Courier;">sTypExprt = &#8220;ODBC Database&#8221; <span style="color:#007F00;">&#8216;Export Type</span><br />
sCnxnStr = &#8220;ODBC;DSN=DSNName;UID=userID;PWD=password&#8221; <span style="color:#007F00;">&#8216;Create the connection string</span></span></p>
<p><span style="font-family: Courier;">vStTime = Timer<br />
Application.Echo <span style="color:#00007F;">False</span>, &#8220;Visual Basic code is executing.&#8221;</span></p>
<p><span style="color:#00007F;"><span style="font-family: Courier;">Set</span></span><span style="font-family: Courier;"> db = CurrentDb()</span></p>
<p><span style="color:#007F00;"><span style="font-family: Courier;">&#8216;need a reference to Microsoft DAO 3.x library</span></span><span style="font-family: Courier;"><br />
<span style="color:#00007F;">For</span> <span style="color:#00007F;">Each</span> tbldef <span style="color:#00007F;">In</span> db.TableDefs<br />
<span style="color:#007F00;">&#8216;Don&#8217;t export System and temporary tables</span><br />
<span style="color:#00007F;">If</span> Left(tbldef.Name, 4)  &#8220;MSys&#8221; And Left(tbldef.Name, 4)  &#8220;~TMP&#8221; <span style="color:#00007F;">Then</span><br />
<span style="color:#007F00;">&#8216;Debug.Print tbldef.Name</span><br />
sTblNm = tbldef.Name<br />
DoCmd.TransferDatabase acExport, sTypExprt, sCnxnStr, acTable, sTblNm, sTblNm<br />
<span style="color:#00007F;">End</span> <span style="color:#00007F;">If</span><br />
<span style="color:#00007F;">Next</span> tbldef</span></p>
<p><span style="font-family: Courier;">MsgBox &#8220;Done! Time taken=&#8221; &amp; Timer &#8211; vStTime</span></p>
<p><span style="color:#00007F;"><span style="font-family: Courier;">On</span></span><span style="font-family: Courier;"> <span style="color:#00007F;">Error</span> <span style="color:#00007F;">GoTo</span> 0<br />
SmoothExit_ExportTbls:<br />
<span style="color:#00007F;">Set</span> db = <span style="color:#00007F;">Nothing</span><br />
Application.Echo <span style="color:#00007F;">True</span><br />
<span style="color:#00007F;">Exit</span> <span style="color:#00007F;">Sub</span></span></p>
<p><span style="font-family: Courier;">ExportTbls_Error:<br />
MsgBox &#8220;Error &#8221; &amp; Err.Number &amp; &#8221; (&#8221; &amp; Err.Description &amp; &#8220;) in procedure ExportTblsODST&#8221;<br />
<span style="color:#00007F;">Resume</span> SmoothExit_ExportTbls<br />
<span style="color:#00007F;">End</span> <span style="color:#00007F;">Sub</span></span></div>
]]></content:encoded>
			<wfw:commentRss>http://nandeshwar.info/2007/07/18/access-vba-export-access-tables-using-odbc/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>

