Bonjour,
je veux accéder a une base de donnée qui se trouve dans ma machine, danc localement, jai essayé sa:
le pb qu'il plante, et meme pas l'interface s'affiche, merci enormement
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11 string strConnexion = "Data Source=localhost; Integrated Security=SSPI;" + "Initial Catalog=Northwind"; try { SqlConnection oConnection = new SqlConnection(strConnexion); oConnection.Open(); MessageBox.Show("Etat de la connexion : " + Connection.State); oConnection.Close(); } catch (Exception e) { }
Partager