-
Feb 19th, 2015, 02:18 PM
#1
Thread Starter
Frenzied Member
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
-
Feb 19th, 2015, 07:23 PM
#2
Re: Can I create an install for loading a SQ BAK file database?
How did you create the installer for the VB program?
-
Feb 19th, 2015, 07:59 PM
#3
Thread Starter
Frenzied Member
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!
-
Feb 20th, 2015, 10:47 AM
#4
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
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|