Click here to Skip to main content
15,897,891 members
Home / Discussions / C#
   

C#

 
GeneralRe: put zoom and unzoom affects in picturebox Pin
Naveed72727-Jan-08 18:15
Naveed72727-Jan-08 18:15 
GeneralRe: put zoom and unzoom affects in picturebox Pin
Paul Conrad28-Jan-08 13:54
professionalPaul Conrad28-Jan-08 13:54 
QuestionHow t get rid/hide True/false drop down List Box when check Box is used with it in Property Grid in C# .NET [modified] Pin
Varad_Rajan22-Jan-08 22:18
Varad_Rajan22-Jan-08 22:18 
GeneralRe: How t get rid/hide True/false drop down List Box when check Box is used with it in Property Grid in C# .NET Pin
Paul Conrad27-Jan-08 7:20
professionalPaul Conrad27-Jan-08 7:20 
Questionhow do i delete the selected node programmatically in tree view? Pin
samidhas22-Jan-08 21:06
samidhas22-Jan-08 21:06 
AnswerRe: how do i delete the selected node programmatically in tree view? Pin
michaelvdnest22-Jan-08 21:39
michaelvdnest22-Jan-08 21:39 
GeneralRestor DataBase By C#.Net Code Pin
Thaer Hamael22-Jan-08 20:48
Thaer Hamael22-Jan-08 20:48 
AnswerRe: Restor DataBase By C#.Net Code Pin
Abhijit Jana22-Jan-08 22:06
professionalAbhijit Jana22-Jan-08 22:06 
using Microsoft.SqlServer.Management.Smo;<br />
private static Server srvSql;<br />
private static ServerConnection srvConn;<br />


Coeenction

<br />
 servername = cmbServer.Text;<br />
                     srvConn = new ServerConnection(cmbServer.SelectedItem.ToString());<br />
                                        srvConn.LoginSecure = true;<br />
                   <br />
                    srvSql = new Server(srvConn);<br />

//Restoring Database
        void Restoring_data()<br />
        {<br />
<br />
            // If there was a SQL connection created<br />
            if (srvSql != null)<br />
            {<br />
                // If the user has chosen the file from which he wants the database to be restored<br />
<br />
                // Create a new database restore operation<br />
                Restore rstDatabase = new Restore();<br />
                // Set the restore type to a database restore<br />
                rstDatabase.Action = RestoreActionType.Database;<br />
                // Set the database that we want to perform the restore on<br />
                rstDatabase.Database = "DataBaseName"<br />
                // Set the backup device from which we want to restore, to a file<br />
                BackupDeviceItem bkpDevice = new BackupDeviceItem(txtbackup.Text.ToString(), DeviceType.File);<br />
                // Add the backup device to the restore type<br />
                rstDatabase.Devices.Add(bkpDevice);<br />
                // If the database already exists, replace it<br />
                rstDatabase.ReplaceDatabase = true;<br />
<br />
                // Perform the restore<br />
                rstDatabase.SqlRestore(srvSql);<br />
<br />
            }<br />
            else<br />
            {<br />
                // There was no connection established; probably the Connect button was not clicked<br />
                MessageBox.Show("A connection to a SQL server was not established.", "Not Connected to Server", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);<br />
            }



Hope this will help your

Best Regards
-----------------
Abhijit Jana
View My Latest Article :- SpyNet : Your Network Spy

"Success is Journey it's not a destination"

GeneralRe: Restor DataBase By C#.Net Code Pin
Thaer Hamael26-Jan-08 21:08
Thaer Hamael26-Jan-08 21:08 
GeneralPassing session variables in to javascript in asp.net Pin
mrcsn22-Jan-08 19:56
mrcsn22-Jan-08 19:56 
NewsRe: Passing session variables in to javascript in asp.net Pin
Abhijit Jana22-Jan-08 20:48
professionalAbhijit Jana22-Jan-08 20:48 
Generalaccessing , deleting , modifing xml file using tree view in c# .net.. Pin
samidhas22-Jan-08 19:55
samidhas22-Jan-08 19:55 
GeneralRe: accessing , deleting , modifing xml file using tree view in c# .net.. Pin
Paul Conrad27-Jan-08 7:20
professionalPaul Conrad27-Jan-08 7:20 
Generalcluless what is happening Pin
Hum Dum22-Jan-08 19:54
Hum Dum22-Jan-08 19:54 
GeneralRe: cluless what is happening Pin
michaelvdnest22-Jan-08 22:04
michaelvdnest22-Jan-08 22:04 
GeneralHelp regarding Hash table in C#.Net Pin
mrcsn22-Jan-08 19:38
mrcsn22-Jan-08 19:38 
GeneralRe: Help regarding Hash table in C#.Net Pin
Mark Churchill23-Jan-08 0:06
Mark Churchill23-Jan-08 0:06 
QuestionDelete .wav file from linux server using c#.net Pin
patel_amit22-Jan-08 19:22
patel_amit22-Jan-08 19:22 
GeneralRe: Delete .wav file from linux server using c#.net Pin
leppie22-Jan-08 21:20
leppie22-Jan-08 21:20 
GeneralRe: Delete .wav file from linux server using c#.net Pin
patel_amit22-Jan-08 23:08
patel_amit22-Jan-08 23:08 
GeneralRe: Delete .wav file from linux server using c#.net Pin
Russell Jones23-Jan-08 3:20
Russell Jones23-Jan-08 3:20 
GeneralAnswer for this Questions Pin
gunaarun22-Jan-08 18:44
gunaarun22-Jan-08 18:44 
JokeRe: Answer for this Questions Pin
MarkB77722-Jan-08 20:28
MarkB77722-Jan-08 20:28 
GeneralRe: Answer for this Questions Pin
Nouman Bhatti22-Jan-08 20:45
Nouman Bhatti22-Jan-08 20:45 
AnswerRe: Answer for this Questions Pin
Abhijit Jana22-Jan-08 20:46
professionalAbhijit Jana22-Jan-08 20:46 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.