Dear sirs
How can I use sqlCommand to restore a database???
I`ve written the following code
sqlCommand1.Connection = this.sqlConnection1;
this.sqlConnection1.Open();
sqlCommand1.CommandText = "RESTORE DATABASE trySQL FROM
DISK = 'c:\trySQL_Back.bak'";
int i = sqlCommand1.ExecuteNonQuery();
this.sqlConnection1.Close();
and it gives me the following exception
An unhandled exception of type
'System.Data.SqlClient.SqlException' occurred in
system.data.dll
Additional information: System error.
thanks
Mohammed