Thursday, March 29, 2012

How Query Analyzer works in Text Mode option ?

Hi,
I want to write a application works in same manner as SQL Query Analyzer
works in Text mode option. I studied the behavior of query analyzer and find
out that in text mode option query analyzer does not wait for the query to
get finished, for displaying the result.
It diplays the result in Text form as and when it gets the result. It works
in some different manner than Query Analyzer working in GRID option.
I also want to write a application which does not wait for all the results
of the query, just give me the records which are available right now and
then give the remaining ones also in similar chunks.
Query Analyzer must be using some API calls through which this is possible.
Can any one help me in figure out what APIs are used by query analyzer in
text mode option.
Any help is appreciated.
Thanks
PushkarTo the best of my knowledge, you cannot use ADO or ADO.NET for this. QA uses
ODBC, and I have a
feeling that it is possible using OLEDB as well. So pick up a programmers ma
nual for one of those
APIs and check for asynchronous execution. But you should carefully consider
the extra work to use
these low level APIs compared to the productivity of a higher level API.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"Pushkar" <pushkartiwari@.gmail.com> wrote in message news:eSsFbyTMGHA.2704@.TK2MSFTNGP15.phx
.gbl...
> Hi,
> I want to write a application works in same manner as SQL Query Analyzer w
orks in Text mode
> option. I studied the behavior of query analyzer and find out that in text
mode option query
> analyzer does not wait for the query to get finished, for displaying the r
esult.
> It diplays the result in Text form as and when it gets the result. It work
s in some different
> manner than Query Analyzer working in GRID option.
> I also want to write a application which does not wait for all the results
of the query, just give
> me the records which are available right now and then give the remaining o
nes also in similar
> chunks.
> Query Analyzer must be using some API calls through which this is possible
.
> Can any one help me in figure out what APIs are used by query analyzer in
text mode option.
> Any help is appreciated.
> Thanks
> Pushkar
>
>|||Pushkar wrote:
> Hi,
> I want to write a application works in same manner as SQL Query Analyzer
> works in Text mode option. I studied the behavior of query analyzer and fi
nd
> out that in text mode option query analyzer does not wait for the query to
> get finished, for displaying the result.
> It diplays the result in Text form as and when it gets the result. It work
s
> in some different manner than Query Analyzer working in GRID option.
> I also want to write a application which does not wait for all the results
> of the query, just give me the records which are available right now and
> then give the remaining ones also in similar chunks.
> Query Analyzer must be using some API calls through which this is possible
.
> Can any one help me in figure out what APIs are used by query analyzer in
> text mode option.
> Any help is appreciated.
> Thanks
> Pushkar
It may help you to read:
http://www.aspfaq.com/show.asp?id=2120
David Portas, SQL Server MVP
Whenever possible please post enough code to reproduce your problem.
Including CREATE TABLE and INSERT statements usually helps.
State what version of SQL Server you are using and specify the content
of any error messages.
SQL Server Books Online:
http://msdn2.microsoft.com/library/ms130214(en-US,SQL.90).aspx
--|||Good thinking, David. :-)
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"David Portas" <REMOVE_BEFORE_REPLYING_dportas@.acm.org> wrote in message
news:1139910046.905427.137570@.g43g2000cwa.googlegroups.com...
> Pushkar wrote:
> It may help you to read:
> http://www.aspfaq.com/show.asp?id=2120
> --
> David Portas, SQL Server MVP
> Whenever possible please post enough code to reproduce your problem.
> Including CREATE TABLE and INSERT statements usually helps.
> State what version of SQL Server you are using and specify the content
> of any error messages.
> SQL Server Books Online:
> http://msdn2.microsoft.com/library/ms130214(en-US,SQL.90).aspx
> --
>

No comments:

Post a Comment