how i can connect c# for update Master SQLSERVER

09/18/2019 12:55 lHatsu#1
Someone can help me how i can connect c# for update Master SQLSERVER

Quote:
namespace WindowsFormsApplication1
{
public partial class Form1 : Form
{
private SqlConnection Cnn;
private SqlCommand sqlCommand;

public Form1()
{
InitializeComponent();
}

private void button1_Click(object sender, EventArgs e)
{
Cnn = new SqlConnection(@"Data Source=127.0.0.1;Initial Catalog=master;User Id=OBDC_DK;Password=123456");
Cnn.Open();

sqlCommand = new SqlCommand("UPDATE master, Cnn);
sqlCommand.Parameters.Add("@Query", textBox1.Text);
sqlCommand.ExecuteNonQuery();

MessageBox.Show("Update SucessFully");
}
}
}
I'm trying but no sucess someone can help me how i can fix this code for update Master Query Azanalizer Sql Server.
I make this code for he update on this sp_addlinkedserver
EXEC sp_addlinkedserver 'Server','','MSDASQL',NULL,NULL,'DRIVER={SQL Server};SERVER=localhost;UID=;PWD=;'
09/18/2019 17:02 False#2
#moved
09/19/2019 21:55 demmybot#3
your update command are broken
you can`t update database you can update a row in table in database or exec procedure like

USE master;
GO
EXEC sp_addlinkedserver
N'MyLinkedServerName',
N'SQL Server';
GO
10/12/2020 12:13 Zro Freaks#4
Bad if is for any public .exe or exe that people can decompile and have access to the db, make tcp connections and a console that is the receiver. The receiver in the vps or server and the .exe with connections for the user