List Info

Thread: <<< I couldnt backup my SQL Databases >>> !!!!!!!!!!!!!!!!




<<< I couldnt backup my SQL Databases >>> !!!!!!!!!!!!!!!!
user name
2006-04-06 09:37:10
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: CSDevelopersgooglegroups.com
[mailto:CSDevelopersgooglegroups.com] On Behalf Of gndzkdrgmail.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 CSDevelopersgooglegroups.com
To unsubscribe from this group, send email to
CSDevelopers-unsubscribegooglegroups.com
For more options, visit this group at http://gr
oups.google.com/group/CSDevelopers
-~----------~----~----~----~------~----~------~--~---

<<< I couldnt backup my SQL Databases >>> !!!!!!!!!!!!!!!!
user name
2006-04-06 10:02:23
 
i applied your advice

FileInfo SourceFile1 =

new FileInfo("\\&quot; + textBox1.Text + "\c:\Program Files\Microsoft SQL Server\MSSQL\Data\\MYDATABASE_Data.Mdf";);

but this time...

there is an Error Message like..

The given path's format is not supported

WHAT MUST I DO NOW ?????

 
&nbsp;


&nbsp;
On 4/6/06, Bradley, Peter <uwic.ac.uk">pbradleyuwic.ac.uk> wrote:

Shouldn't that be "c:\&quot; and not "c\&quot;???

Also it's much nicer to use escaped strings for readability. &nbsp;Something
like:

FileInfo SourceFile1 = new FileInfo("\\&quot; + textBox1.Text +
"\c:\Program Files\Microsoft SQL
Server\MSSQL\Data\MYDATABASE_Data.Mdf&quot;);

HTH


Peter

-----Original Message-----
From: googlegroups.com">CSDevelopersgooglegroups.com
[mailto:googlegroups.com">CSDevelopersgooglegroups.com] On Behalf Of gmail.com"> gndzkdrgmail.com
Sent: 06 April 2006 10:01
To: C# Developers
Subject: <<&lt; I couldnt backup my SQL Databases >>&gt; !!!!!!!!!!!!!!!!


here is Codes

////////////////// textBox1.Text = ADEMTEKEREK &nbsp; &nbsp; &nbsp; &nbsp;(server
computer's name)

FileInfo SourceFile1=new FileInfo(&quot;\\\\&quot; + textBox1.Text +
"\\c\\Program&nbsp; Files\\Microsoft SQL
Server\\MSSQL\\Data\\MYDATABASE_Data.Mdf");

FileInfo SourceFile2=new FileInfo(&quot;\\\\&quot; + textBox1.Text +
"\\c\\Program Files\\Microsoft SQL
Server\\MSSQL\\Data\\MYDATABASE_Log.Ldf");

SourceFile1.CopyTo(&quot;D:\\";,true);
SourceFile2.CopyTo(&quot;D:\\";,true);

....and when i start my form, there is this Error Message

Could not find file"\\ADEMTEKEREK\c\Program &nbsp;Files\Microsoft SQL
Server\MSSQL\Data\MYDATABASE_Data.Mdf&quot;


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 CSDevelopersgooglegroups.com
To unsubscribe from this group, send email to CSDevelopers-unsubscribegooglegroups.com
For more options, visit this group at http://groups.google.com/group/CSDevelopers
-~----------~----~----~----~------~----~------~--~---

[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )