Shouldn't that be "c:\" and not
"c\"???
Also it's much nicer to use escaped strings for
readability. Something
like:
FileInfo SourceFile1 = new FileInfo( "\\" +
textBox1.Text +
"\c:\Program Files\Microsoft SQL
Server\MSSQL\Data\MYDATABASE_Data.Mdf");
HTH
Peter
-----Original Message-----
From: CSDevelopers googlegroups.com
[mailto:CSDevelopers googlegroups.com] On Behalf Of gndzkdr gmail.com
Sent: 06 April 2006 10:01
To: C# Developers
Subject: <<< I couldnt backup my SQL Databases
>>> !!!!!!!!!!!!!!!!
here is Codes
////////////////// textBox1.Text = ADEMTEKEREK
(server
computer's name)
FileInfo SourceFile1=new FileInfo("\\\\" +
textBox1.Text +
"\\c\\Program Files\\Microsoft SQL
Server\\MSSQL\\Data\\MYDATABASE_Data.Mdf");
FileInfo SourceFile2=new FileInfo("\\\\" +
textBox1.Text +
"\\c\\Program Files\\Microsoft SQL
Server\\MSSQL\\Data\\MYDATABASE_Log.Ldf");
SourceFile1.CopyTo("D:\\",true);
SourceFile2.CopyTo("D:\\",true);
....and when i start my form, there is this Error Message
Could not find file"\\ADEMTEKEREK\c\Program
Files\Microsoft SQL
Server\MSSQL\Data\MYDATABASE_Data.Mdf"
WHAT CAN I DO...???????
thnks for now.....
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "C# Developers" group.
To post to this group, send email to CSDevelopers googlegroups.com
To unsubscribe from this group, send email to
CSDevelopers-unsubscribe googlegroups.com
For more options, visit this group at http://gr
oups.google.com/group/CSDevelopers
-~----------~----~----~----~------~----~------~--~---
|