开发者

Restore a Database Programatically (SQL Server)

I recently found this link which shows a great example of backing up and restoring a sql server database. However, my SQL Server only uses WindowsAuthentication and so it does not really require a UserName and Password. To be able to do this, I turned the line srvConn.LoginSecure = false; into srvConn.LoginSecure = true;

I was expecting to connect succesfully 开发者_JAVA技巧to the Server. However, this example returns an exception saying that it was unable to connect to the server.

Can anybody help me please? I have to learn this application for me to be able to apply the same concept to a project i'm working on. Thank you very much.


First of all if you want to enable remote connection to your server (I'm not sure if this is what you're after), Try this: http://support.microsoft.com/kb/914277 . You will also want to make sure the mixed authentication option is enabled.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜