Failed to connect to server SERVER.

Mar 10 2011 12:11 AM


Server server = new Server("SERVER");

server.ConnectionContext.SqlExecutionModes = 

SqlExecutionModes.CaptureSql;

Database db = server.Databases["myDatabase"];

This my code for connection for generate script but an error occur

(Failed to connect to server SERVER.) in this line

Database db = server.Databases["myDatabase"];




Answers (5)