using SMO classes one can backup a sql server database
in .bak extension.It's a programming approach to backup
database.there are other ways but using SMO classes it
is efficient and error free.
stored procedures allow flexibility by offering capabilities like
conditional logic.a single procedure may execute a set of SQL
statements which are really complex.
you should backup your database file of your
windows software.there are many reasons why you
will backup your database file.i will not write
details about that.i showing here how to
backup your database file for safety of your
If you want to publish your database from one database
server to another,sql server database publishing
wizard can do that.without downloading it you can
use visual studio to publish your db as .sql script
file.then you can run this script file in another
sql server to get the database with all tables and data.
I show you how -
normally we define connectionstrings under
<connectionStrings> tag in the web.config
file.membership providers use that
connectionstring.what if we needed to use
the connectionstring in asp.net pages?.
It's a good idea to use a class say gateway where all
database access codes will be written.in this gateway class
you will implement db connection as follows -
first create another class -