Click here to Skip to main content
15,914,642 members
Home / Discussions / C#
   

C#

 
AnswerRe: appending "\" to a string Pin
omlac30-Sep-08 21:51
omlac30-Sep-08 21:51 
Questionprogressbar problem Pin
Mogaambo30-Sep-08 3:21
Mogaambo30-Sep-08 3:21 
QuestionInvalidCastException: asp.net custom class Application variable [modified] Pin
davidhere4030-Sep-08 2:56
davidhere4030-Sep-08 2:56 
JokeRe: InvalidCastException: asp.net custom class Application variable Pin
Giorgi Dalakishvili30-Sep-08 3:19
mentorGiorgi Dalakishvili30-Sep-08 3:19 
GeneralRe: InvalidCastException: asp.net custom class Application variable Pin
Wendelius30-Sep-08 3:47
mentorWendelius30-Sep-08 3:47 
GeneralRe: InvalidCastException: asp.net custom class Application variable Pin
Giorgi Dalakishvili30-Sep-08 3:53
mentorGiorgi Dalakishvili30-Sep-08 3:53 
GeneralRe: InvalidCastException: asp.net custom class Application variable Pin
Mbah Dhaim30-Sep-08 10:33
Mbah Dhaim30-Sep-08 10:33 
Questionrestore Pin
NiloofarNoroozi30-Sep-08 2:53
NiloofarNoroozi30-Sep-08 2:53 
hi i use these code for restore
this.openFileDialog1.ShowDialog();
if ((this.openFileDialog1.FileName != "") && (this.openFileDialog1.FileName!="openFileDialog1"))
{
    try
    {

        filename = openFileDialog1.FileName;

        SqlConnection SqlCon = new SqlConnection();
        SqlCon.ConnectionString = global::project.Properties.Settings.Default.dabirkhanehConnectionString;
        SqlCommand SqlCom = new SqlCommand();
        SqlCom.Connection = SqlCon;

        SqlCon.Open();
        SqlCom.CommandText ="ALTER DATABASE dabirkhaneh SET SINGLE_USER WITH ROLLBACK IMMEDIATE" +" USE master; RESTORE DATABASE dabirkhaneh FROM DISK =N'"+filename+"'";
        SqlCom.Connection = SqlCon;
        SqlCom.ExecuteNonQuery();
        SqlCon.Close();

       // *******************//
        SqlCon.Open();
        SqlCom.CommandText ="ALTER DATABASE dabirkhaneh SET MULTI_USER ";
        SqlCom.Connection = SqlCon;
        SqlCom.ExecuteNonQuery();
        SqlCon.Close();
        MessageBox.Show("بازیابی با موفقیت انجام شد");
    }
    catch
    {
        MessageBox.Show("بازیابی با موفقیت انجام نشد");
    }
}

but i have error;
The tail of the log for the database "vezaratekar" has not been backed up. Use BACKUP LOG WITH NORECOVERY to backup the log if it contains work you do not want to lose. Use the WITH REPLACE or WITH STOPAT clause of the RESTORE statement to just overwrite the contents of the log.
RESTORE DATABASE is terminating abnormally.
Changed database context to 'master'.

please help
thanks
AnswerRe: restore Pin
Wendelius30-Sep-08 3:46
mentorWendelius30-Sep-08 3:46 
QuestionIf I link in files (DLLs, GIF-images, etc) into my executable, how do I then access the files? Pin
arnold_w30-Sep-08 2:21
arnold_w30-Sep-08 2:21 
AnswerRe: If I link in files (DLLs, GIF-images, etc) into my executable, how do I then access the files? Pin
Pete O'Hanlon30-Sep-08 2:31
mvePete O'Hanlon30-Sep-08 2:31 
AnswerRe: If I link in files (DLLs, GIF-images, etc) into my executable, how do I then access the files? Pin
Giorgi Dalakishvili30-Sep-08 2:36
mentorGiorgi Dalakishvili30-Sep-08 2:36 
GeneralRe: If I link in files (DLLs, GIF-images, etc) into my executable, how do I then access the files? Pin
arnold_w30-Sep-08 21:57
arnold_w30-Sep-08 21:57 
GeneralRe: If I link in files (DLLs, GIF-images, etc) into my executable, how do I then access the files? Pin
Giorgi Dalakishvili30-Sep-08 22:02
mentorGiorgi Dalakishvili30-Sep-08 22:02 
GeneralRe: If I link in files (DLLs, GIF-images, etc) into my executable, how do I then access the files? Pin
arnold_w30-Sep-08 22:06
arnold_w30-Sep-08 22:06 
GeneralRe: If I link in files (DLLs, GIF-images, etc) into my executable, how do I then access the files? Pin
Giorgi Dalakishvili30-Sep-08 22:10
mentorGiorgi Dalakishvili30-Sep-08 22:10 
GeneralRe: If I link in files (DLLs, GIF-images, etc) into my executable, how do I then access the files? Pin
arnold_w30-Sep-08 22:27
arnold_w30-Sep-08 22:27 
GeneralRe: If I link in files (DLLs, GIF-images, etc) into my executable, how do I then access the files? Pin
Giorgi Dalakishvili30-Sep-08 22:33
mentorGiorgi Dalakishvili30-Sep-08 22:33 
GeneralRe: If I link in files (DLLs, GIF-images, etc) into my executable, how do I then access the files? Pin
arnold_w30-Sep-08 22:42
arnold_w30-Sep-08 22:42 
GeneralRe: If I link in files (DLLs, GIF-images, etc) into my executable, how do I then access the files? Pin
Giorgi Dalakishvili30-Sep-08 22:44
mentorGiorgi Dalakishvili30-Sep-08 22:44 
QuestionMap file format for gps application Pin
rnvrnv30-Sep-08 1:56
rnvrnv30-Sep-08 1:56 
AnswerRe: Map file format for gps application Pin
John Ad30-Sep-08 2:11
John Ad30-Sep-08 2:11 
GeneralRe: Map file format for gps application Pin
rnvrnv30-Sep-08 4:16
rnvrnv30-Sep-08 4:16 
QuestionGrouping relevant data together while iterating throug them Pin
J-Cod3r30-Sep-08 1:52
J-Cod3r30-Sep-08 1:52 
QuestionHow to convert a string in to bulleted format? Pin
DJ24530-Sep-08 1:32
DJ24530-Sep-08 1:32 

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.