Bookmark and Share

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: drop down menu vs. command line


From   Thomas Speidel <[email protected]>
To   <[email protected]>
Subject   st: ODBC: drop down menu vs. command line
Date   Wed, 22 Feb 2012 10:37:16 -0700

I have a do file that starts by importing a dataset in a SQL server database using the odbc command (in Stata 12.1 for Win x86-64). However, I noticed that I cannot succesfully execute the odbc command if submitted from the do file or typed it in the command line. Strangely enough, if I use the drop down menu (File>Import>ODBC data source), select my database and tables and submit, it does work. Notice that the odbc command produced by the menu choices is identical to the one in my do file (below).

**********************************************************
. odbc load, table("dbo.PrePostControlBloodIds") clear lowercase noquote
dsn() or connectinstring() required
r(198);

end of do-file

r(198);
**********************************************************

I would like to know what is causing this and if there is a way around it (i.e. avoiding having to use drop down menus everytime I need to import my data).

Thanks,

--
..................................................................................
Thomas Speidel, Statistical Associate, A.Stat.
Alberta Health Services, Cancer Care | Department of Population Health Research
..................................................................................

*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index