Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down on April 23, and its replacement, is already up and running.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: changeing the database with odbc without using dialog box

From   "Dimitriy V. Masterov" <>
To   Statalist <>
Subject   st: changeing the database with odbc without using dialog box
Date   Thu, 29 Jul 2010 12:10:56 -0400

Is there a way to tell Stata which odbc database to use without going
through the dialog prompt? I am loading some data with:

odbc load, dsn("MIHQDB50") table(tabWeeklyStoreItemPricingAll) clear

This produces the error:

The ODBC driver reported the following diagnostics
[Microsoft][ODBC SQL Server Driver][SQL Server]Invalid object name

This is because the default is to use the database DataWarehouse. When
I use the dialog box to change to database to Orders, where the table
I want is located, everything works, but requires manual effort:

odbc load, dsn("MIHQDB50") table(tabWeeklyStoreItemPricingAll) dialog(prompt);

Is there a way to let Stata know which database I want to use?

*   For searches and help try:

© Copyright 1996–2016 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index