New Application Installation - SQL DB

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Jim Heavey

    New Application Installation - SQL DB

    I am getting ready to create my very first install of a C# application. I
    have never done this before, so pardon if my questions are somewhat basic.

    My install required a database to be - in place and I was wanting to test
    if the database was present, if if not present, install it.

    How do I test is SQL Server is installed on the machine?
    I have a stored procedure for restoring the database if it is not present,
    but What how do you go about supplying the connection string, when it would
    appear that I have to identify the Database in the connection string, as
    database which is not present?

    How do I invoke this "checker and SQL Server DatabaseInstall er routine" as
    part of the installation process?

    Thanks in advance for your assistance!!!!! !!
  • Old Enough to Know Better

    #2
    Re: New Application Installation - SQL DB


    "Jim Heavey" <JimHeavey@nosp am.com> wrote in message
    news:Xns9473CE1 5E8009JimHeavey hotmailcom@207. 46.248.16...[color=blue]
    > I am getting ready to create my very first install of a C# application. I
    > have never done this before, so pardon if my questions are somewhat basic.
    >
    > My install required a database to be - in place and I was wanting to test
    > if the database was present, if if not present, install it.
    >
    > How do I test is SQL Server is installed on the machine?
    > I have a stored procedure for restoring the database if it is not present,
    > but What how do you go about supplying the connection string, when it[/color]
    would[color=blue]
    > appear that I have to identify the Database in the connection string, as
    > database which is not present?
    >
    > How do I invoke this "checker and SQL Server DatabaseInstall er routine" as
    > part of the installation process?
    >
    > Thanks in advance for your assistance!!!!! !![/color]

    You could use SQLDMO but, I think that requires COM interop.
    SQLDMO allows you to enumerate SQL servers & databases and perform
    backup/restores.
    I'm just picking up C# myself so maybe someone more seasoned in C# has a
    better answer.
    I'm also interested to see any ideas.
    Good luck


    Comment

    Working...