dcsimg
Results 1 to 4 of 4

Thread: Can I create an install for loading a SQ BAK file database?

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    Oct 2000
    Posts
    1,463

    Question Can I create an install for loading a SQ BAK file database?

    My client loads an install file for the vb.net program I wrote. He then loads the install for SQL Express. Then he needs to load the BAK database backup which he uses the command line program for. Is there any install to load the BAK file? How hard would it be to write a .NET install program to run the command line utility? I'm not sure how to get the response from it to show in a program but will look it up.

    Thanks,

    Warren

  2. #2
    .NUT jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    103,679

    Re: Can I create an install for loading a SQ BAK file database?

    How did you create the installer for the VB program?

  3. #3

    Thread Starter
    Frenzied Member
    Join Date
    Oct 2000
    Posts
    1,463

    Re: Can I create an install for loading a SQ BAK file database?

    I jut used an install program for it. Looks like I am just going to write a small program to do the install. It seems each user may have a different instance name for the SQL server that needs to be passed. So I'll basically write a GUI app for the command SQLCMD dos program. I'm sure they may be out there but I'll write one custom to go with my program. It won't be hard to do. I can combine it with the BAK file in the install. Then when installed they can just run that program to restore the BAK file in the sql server.

    Thanks!

  4. #4
    PowerPoster techgnome's Avatar
    Join Date
    May 2002
    Posts
    32,638

    Re: Can I create an install for loading a SQ BAK file database?

    Build it right into the app... when it starts up (following an install) it checks its settings to see if it has all the connection info. If it doesn't then it presents the user with a form to select the SQL Server instance they want and optionally (if you want to allow them the ability to do so) the name of the database. You attempt at another connection real quick just to verify that the database doesn't exist. If it does not exist, then you issue the restore command... if it does exist, you connect and verify that the database format is correct (select something from a known table.) If it passes that, then store the settings and the user continues. If it fails at any point, you respond to the user with the problem and/or the corrective actions: "Selected database exists, but is not valid for this application. Please enter or select a new database to use."

    -tg
    * I don't respond to private (PM) requests for help. It's not conducive to the general learning of others.*
    * I also don't respond to friend requests. Save a few bits and don't bother. I'll just end up rejecting anyways.*
    * How to get EFFECTIVE help: The Hitchhiker's Guide to Getting Help at VBF - Removing eels from your hovercraft *
    * How to Use Parameters * Create Disconnected ADO Recordset Clones * Set your VB6 ActiveX Compatibility * Get rid of those pesky VB Line Numbers * I swear I saved my data, where'd it run off to??? *

Posting Permissions

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



Featured


Click Here to Expand Forum to Full Width