Forum Replies Created

Viewing 7 posts - 1 through 7 (of 7 total)

  • RE: List all sql server 2005 with SMO

    Hi,

    Ok, if I understood you correctly you want to execute a stored procedure depending on certain parameters and then return the data + rowcount?

    IF so there is no need of...

  • RE: ExecuteWithResultsAndMessages doesnt return message

    Hi,

    I usually display the errors through a try and catch;

    Try

    //Your code

    ...

  • RE: List all sql server 2005 with SMO

    Hi,

    You want to execute a stored procedure and return the number of rows returned by the sp using ADO.NET?

    If so then I created this function that generates the sp script...

  • RE: List all sql server 2005 with SMO

    Hi,

    I wouldn't use the datareader of ADO.NET to get the record count!

    If you want to get the number of found servers use;

    // this continues from the code of the...

  • RE: List all sql server 2005 with SMO

    Hi,

    Its very simple!

    Reference the following;

    Imports Microsoft.SqlServer.Management.Smo

    Imports Microsoft.SqlServer.Management.Common

    ---------------------------------------------------------------------------

    I'm getting all SQL server instances on the network;

    'Getting all Servers on network and fill DataTable

    ...

  • RE: List all sql server 2005 with SMO

    Use This code !

    ----------------------------------------------------------

    Imports Microsoft.SqlServer.Management.Smo

    Imports Microsoft.SqlServer.Management.Common

    Dim dts As DataTable = SmoApplication.EnumAvailableSqlServers(False)

    cmbSServers.DataSource = dts

    cmbSServers.ValueMember = "Name"

    -----------------------------------------------

    Matt

  • RE: ListAvailableSQLServers Not Showing Local Server

    I had the same problem I also was using DMO.

    I decided to work with SMO and it worked.

    The following is the code I used instead.

    Imports Microsoft.SqlServer.Management.Smo

    Imports Microsoft.SqlServer.Management.Common

    Dim dts As DataTable...

Viewing 7 posts - 1 through 7 (of 7 total)