C SHARP - CONEXAO SQL
Alguem tem um exemplo de uma string de conexao para banco SQL Server, O programa é simples apenas um formulario
Obs: é necessário fazer referencia (igual ao do VB.)
Obs: é necessário fazer referencia (igual ao do VB.)
de uma olhada em http://www.connectionstrings.com
e veja se ajuda...
e veja se ajuda...
using System.Data.SqlClient;
...
...
..
private void Form1_Load(object sender, System.EventArgs e)
{
sqlConnection thisConnection = new SqlConnection("Data Source=SERVIDOR01;Integrated Security=SSPI;Initial Catalog=DbRelatorioParadas");
thisConnection.Open();
SqlCommand thisCommand = thisConnection.CreateCommand();
}
ao compilar dá o seguinte erro: The type or namespace 'sqlConnection' could not be found (are you missing a using directive or an assembly reference?
Tem que fazer alguma referência?
...
...
..
private void Form1_Load(object sender, System.EventArgs e)
{
sqlConnection thisConnection = new SqlConnection("Data Source=SERVIDOR01;Integrated Security=SSPI;Initial Catalog=DbRelatorioParadas");
thisConnection.Open();
SqlCommand thisCommand = thisConnection.CreateCommand();
}
ao compilar dá o seguinte erro: The type or namespace 'sqlConnection' could not be found (are you missing a using directive or an assembly reference?
Tem que fazer alguma referência?
xiii
agora perguntou d+
agora perguntou d+
Tópico encerrado , respostas não são mais permitidas