Register for your free account! | Forgot your password?

Go Back   elitepvpers > Coders Den > .NET Languages
You last visited: Today at 05:08

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



how i can connect c# for update Master SQLSERVER

Discussion on how i can connect c# for update Master SQLSERVER within the .NET Languages forum part of the Coders Den category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: May 2019
Posts: 12
Received Thanks: 1
how i can connect c# for update Master SQLSERVER

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=;'



lHatsu is offline  
Old 09/18/2019, 17:02   #2
Moderator



 
elite*gold: 0
The Black Market: 235/0/0
Join Date: Apr 2011
Posts: 9,258
Received Thanks: 2,200
Arrow General Coding -> .NET Languages

#moved


False is offline  
Old 09/19/2019, 21:55   #3
 
elite*gold: 0
Join Date: Apr 2008
Posts: 2
Received Thanks: 0
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
demmybot is offline  
Reply



« [HELP] Listview wird nicht angezeigt -.- | - »

Similar Threads
i want 8.1 database working with sqlserver 2008 r2
01/16/2015 - Rappelz Private Server - 3 Replies
hello guys i want 8.1 database working with sqlserver 2008 r2
[Problem] =D withe SqlServer
11/19/2012 - Rappelz Private Server - 5 Replies
Hi , when i delete This code--("910005 ")-- from Telecaster jus this ("910005 ") i Find this error -_-" Msg 8646, Level 21, State 1, Line 4 Unable to find index entry in index ID 4, of table 1366295927, in database 'Telecaster'. The indicated index is corrupt or there is a problem with the current update plan. Run DBCC CHECKDB or DBCC CHECKTABLE. If the problem persists, contact product support. Msg 0, Level 20, State 0, Line 0 A severe error occurred on the current command. The...
SQLServer erstellt keine Datenbanken mehr ..
05/02/2012 - Flyff Private Server - 3 Replies
Hallo, ich habe das Problem, dass Microsoft SQLServer keine Datenbanken mehr erstellt. Ich hatte vor längerer Zeit mal eine Flyff-Datenbank laufen, von dort müssen scheinbar, trotz (mehrfacher) Deinstallation und Neuinstallation, noch Daten oder komplette Datenbanken vorhanden sein, denn wenn ich die AiO-Datenbank von Sedrika ausführe meint das Programm: "In der Datenbank ist bereits ein Objekt mit dem Namen 'ACCOUNT_TBL' vorhanden." (nur als Beispiel, gilt auch für die anderen Daten) -...
[Help]I have a problem with SQLServer 2008 R2/J'ai un probléme avec SQLServer 2008 R2
03/01/2012 - Rappelz Private Server - 8 Replies
Hi ! I have a problem when I install SQL Server 2008 R2. ___________________________________________ Bonjour ! J'ai un problème lors de l’installation de SQL Server 2008 R2. Here is a screenshot / Voici un screenshot :



All times are GMT +2. The time now is 05:08.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.

BTC: 33E6kMtxYa7dApCFzrS3Jb7U3NrVvo8nsK
ETH: 0xc6ec801B7563A4376751F33b0573308aDa611E05

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2019 elitepvpers All Rights Reserved.