Eu meu me respondo...rs...
usuario = txtusuario.Text
senha = txtsenha.Text
servidor = txtservidor.Text
BancoDados = txtbancobd.Text
cn.Provider = "SQLOLEDB"
cn.Properties("Data Source").Value = servidor
cn.Properties("Initial Catalog").Value = BancoDados
cn.Properties("User ID").Value = usuario
cn.Properties("Password").Value = senha
cn.Open
MsgBox " Conexao efetuada com sucesso ! "
Agora minha duvida se alguem conhece um programa para criar tabelas no Msde fora o Web Matrix, porque eu não consigo me conectar aparece o seguinte erro:
System.ArgumentNullException: Value cannot be null.
Parameter name: item
at System.Windows.Forms.ObjectCollection.Add(Object item)
at Microsoft.Matrix.Packages.DBAdmin.UserInterface.Sql.SqlDatabaseLoginForm.OnAsyncConnectCompleted(Object sender, AsyncTaskResultPostedEventArgs e)
at Microsoft.Matrix.Utility.AsyncTaskManager.UIThreadCallback(AsyncTaskMessage message)
Até...
Roberto