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

RE: st: Db with an ado

From   "Tharyan, Rajesh" <>
To   "" <>
Subject   RE: st: Db with an ado
Date   Thu, 30 Apr 2009 10:16:59 +0100

Thanks all.. Following martin's advice I checked up the help for dialog programming. 
In section 5.5.1 of the help it says as below

5.5.1 stata


stata hidden [immediate | queue]
Use of option() communication:  None.

stata executes the current cmdstring, optstring and displays the command in the Results window before execution, 
just as if the user had typed it.

stata hidden executes the current cmdstring, optstring, but does not display the command in the 
Results window before execution.  stata hidden may optionally be called with either
of two modifiers:  queue or immediate.  If neither modifier is specified, immediate is implied.

Could this be the solution? How does one use stata hidden?


-----Original Message-----
From: [] On Behalf Of Martin Weiss
Sent: 29 April 2009 15:05
Subject: AW: st: Db with an ado


I would not jump to this conclusion. Towards the end of 

help dialog_programming

remarks 5.5, there is a statement to the effect that " Dialogs that are launched by using the db command cause Stata to become busy and remain busy until the dialog is completely loaded."

If you run Rajesh`s commands interactively, there is no problem. If you run them from a do/ado-file, as his subject line seems to indicate, then Stata waits for your input from the dialog box, gets it, executes the rest of the do file with the "_request" and immediately afterwards implements the u-action from the dialog box, which subsequently is soaked up as the answer to the request...


-----Ursprüngliche Nachricht-----
Von: [] Im Auftrag von Maarten buis
Gesendet: Mittwoch, 29. April 2009 15:53
Betreff: Re: st: Db with an ado

--- On Wed, 29/4/09, Tharyan, Rajesh wrote:
> When I issue a command followed by by a request statement
> as in something like below..
> . db use
>  . di "do you want to list: (enter 1 for yes 2 for no)
> " _request(_answer)
> do you want to list: (enter 1 for yes 2 for no) . use
> "C:\data\results.dta", clear
> Stata automatically uses the echo from the db use command
> as _answer. Is there anyway to prevent this?

Sounds like there is something wrong with your Stata 
instalation. The first thing you could try is type:

update all
update swap

Hope this helps,

Maarten L. Buis
Institut fuer Soziologie
Universitaet Tuebingen
Wilhelmstrasse 36
72074 Tuebingen


*   For searches and help try:

*   For searches and help try:

*   For searches and help try:

© Copyright 1996–2017 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index