Click here to Skip to main content
Rate this: bad
Please Sign up or sign in to vote.
See more: C# SQL-Server
i wanna program a code which is can be a simple example of SQL SERVER 2008 backup/restore in c# which data base not using password and username in its connection string ... i search many projects in google but none of couldn't help me to can make a simple project for backup and restore database sql server... please kindly show me any good complete code which i can create a simple project for my understanding which this program simply run .... many thanks
its back up works right but for restor failed for connect to server ?
        <add name="Alioglu.Util.SqlSrv.BackupRestore.Properties.Settings.masterConnectionString">
            connectionString="Data Source=PERSIAN-PC\SQLEXPRESS;Initial catalog=master;Integrated Security=True;User Instance=True"
            providerName="System.Data.SqlClient" />
Posted 18-Jan-13 1:25am
Edited 18-Jan-13 2:46am

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

If your server is set up for windows authentication and your C# program runs under an authenticated account, you do not need to give credentials. If not, then there's no way.
rflower at 18-Jan-13 8:44am
yes it has set but what i have written why not working in xml for its connection string ... it works right for BACKUP but it given this error for RESTORE Part "Restore Failed for server PERSIAN-PC\SQL-EXPRESS " ?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 Sergey Alexandrovich Kryukov 521
1 OriginalGriff 349
2 DamithSL 235
3 Maciej Los 170
4 Bruno Sprecher 130
0 DamithSL 95
1 OriginalGriff 65
2 Gopu Raj 30
3 Mahsa Hassankashi 25
4 Raul Iloc 25

Advertise | Privacy | Mobile
Web01 | 2.8.141030.1 | Last Updated 18 Jan 2013
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100