2
我有一個活躍的SMO連接CREATE DATABASE命令失敗
string server = textBox_Server.Text;
ServerConnection srvConn = new ServerConnection(server);
// Log in using SQL authentication instead of Windows authentication
srvConn.LoginSecure = false;
// Give the login username
srvConn.Login = textBox_userName.Text;
// Give the login password
srvConn.Password = textBox_Password.Text;
// Create a new SQL Server object using the connection we created
srvSql = new Server(srvConn);
我可以看到有現有的數據庫及其信息。 但是當我嘗試創建一個新的數據庫
Database myDatabase = new Database(srvSql, "MyNewDatabase");
myDatabase.Create();
我正在一個FailedOperationExeption,任何想法,爲什麼?當我創建一個新的數據庫時,我做錯了什麼。我怎麼能解決它...
感謝您的幫助。
我的問題是w7_64問題 – 2010-11-10 14:16:47
HTTP找到解決辦法://社會。 msdn.microsoft.com/Forums/en/sqlsmoanddmo/thread/861b57bc-aa21-4b03-bd01-5c164e2bac4e – 2010-11-10 14:20:13