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....< wrote on 6 Apr 2006 02:02:09 -0700:
> 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....
Do you have a share named "c" on the machine ADEMTEKEREK that is mapped to
the root of drive c? Does the account this code runs under have access to
network shares?
I'd also recommend that you don't just copy the MDF and LDF files as a
backup - if these are in use by SQL Server you will likely end up with
unusable files. Have SQL Server do a BACKUP and then copy those files.
Dan
Showing posts with label ltltlt. Show all posts
Showing posts with label ltltlt. Show all posts
Thursday, February 16, 2012
<<< Connection Problem with SQL Server + C#.Net on Local Area Network >>>
hi all,
i m new on Sql and i have a project related to C# and Sql.
i have to do a project which must work on LAN, and there must be only
one database file on main computer(Server Computer) and other
computers(client computers) must connect database on main computer.
i m preparing my project on my personal computer(it is called MYCOMP)
and doing connection with wizard. then it doesnt work on other
computers(works only my personal computer). when i done connection with
wizard .Net create a connection code like below...
// sqlConnection1
//
this.sqlConnection1.ConnectionString = "workstation id=MYCOMP;packet
size=4096;integrated security=SSPI;data source=MYCOM" +
"P;persist security info=False;initial catalog=migros";
i think, because of taking my computer's name in connection string it
doesnt work on other computers...
what can i do for this problem :((((((((
please write me a solution as soon as possible...( i have only 15 days
to hand over and still couldnt start to write my codes, otherwise i
cant graduate...)
PLEASE HEEEEEEEEEEEEEEEELP !!!!!!!
thnks for now.....Hi, no need to multipost.
Answered in .programming.
HTH, jens Suessmeyer.
--
http://www.sqlserver2005.de
--
i m new on Sql and i have a project related to C# and Sql.
i have to do a project which must work on LAN, and there must be only
one database file on main computer(Server Computer) and other
computers(client computers) must connect database on main computer.
i m preparing my project on my personal computer(it is called MYCOMP)
and doing connection with wizard. then it doesnt work on other
computers(works only my personal computer). when i done connection with
wizard .Net create a connection code like below...
// sqlConnection1
//
this.sqlConnection1.ConnectionString = "workstation id=MYCOMP;packet
size=4096;integrated security=SSPI;data source=MYCOM" +
"P;persist security info=False;initial catalog=migros";
i think, because of taking my computer's name in connection string it
doesnt work on other computers...
what can i do for this problem :((((((((
please write me a solution as soon as possible...( i have only 15 days
to hand over and still couldnt start to write my codes, otherwise i
cant graduate...)
PLEASE HEEEEEEEEEEEEEEEELP !!!!!!!
thnks for now.....Hi, no need to multipost.
Answered in .programming.
HTH, jens Suessmeyer.
--
http://www.sqlserver2005.de
--
Subscribe to:
Posts (Atom)