Results 1 to 5 of 5
  1. #1
    Join Date
    Jan 2004
    Posts
    31

    Unanswered: SQL Server: execution plans + statistics

    In using ADO to connect to SQL Server, I'm trying to retrieve multiple datasets AND statistics that are usually returned via the OnInfoMessage event. For those that are familiar with SQL Server, I need the results returned by the SET STATISTICS IO ON and SET STATISTICS PROFILE ON options. Anyone had any luck doing this before?

    Thanks in advance.

  2. #2
    Join Date
    Jan 2004
    Location
    Venezuela
    Posts
    151

    Re: SQL Server: execution plans + statistics

    Originally posted by Mike Collier
    In using ADO to connect to SQL Server, I'm trying to retrieve multiple datasets AND statistics that are usually returned via the OnInfoMessage event. For those that are familiar with SQL Server, I need the results returned by the SET STATISTICS IO ON and SET STATISTICS PROFILE ON options. Anyone had any luck doing this before?

    Thanks in advance.
    There is a forum for SQL Server. This forum is for Oracle.
    Joel Pérez

  3. #3
    Join Date
    Feb 2002
    Posts
    2,232
    I don't think this will answer your entire question - but you need to use the nextrecordset method of the recordset object.

  4. #4
    Join Date
    Jul 2003
    Location
    San Antonio, TX
    Posts
    3,662
    Informational messages can also be retrieved from Errors collection. You just need to set appropriate properties to your connection object prior to opening a resultset (or multiple resultsets.)

  5. #5
    Join Date
    Jan 2004
    Posts
    31
    Thanks for the tip, any examples of the changes to the connection?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •