Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
st: ODBC connection strings
From
Janet Hill <[email protected]>
To
"[email protected]" <[email protected]>
Subject
st: ODBC connection strings
Date
Mon, 30 Sep 2013 15:05:17 +0100 (BST)
Hello,
When I connect Stata to Access database I typically use statements of the form:
odbc query "MS Access Database;DBQ=C:\Julie\Data September 2013.accdb;"
or
local dsn MS Access Database;DBQ=Data September 2013.accdb;DefaultDir=C:\Julie\;
odbc load, table("Demographics") dsn("`dsn'") clear allstring
Recently my database administrator has told me that this approach is 'obsolete' and that I should use connection strings. I have read Kevin Crow's article in the Stata blog http://blog.stata.com/2010/11/10/connection-string-support-added-to-odbc-command/ and I have two questions:
1. What is the advantage in using connection strings
2. What syntax should I use to replace my existing code? I looked at the Microsoft article http://msdn.microsoft.com/en-us/library/ms722656%28VS.85%29.aspx on syntax but I cannot figure it out.
I am using Stata 13.
Many thanks.
Janet
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/faqs/resources/statalist-faq/
* http://www.ats.ucla.edu/stat/stata/