La propriété ConnectionString n'a pas été initialisée.
Bonjour
je débute en VB.NET et j'y comprend rien à cette erreur
voici le bout de code de ma connexion:(
Code:
1 2 3 4 5 6 7 8 9 10
| ' Déclaration des différents objets
Dim oConnection As System.Data.SqlClient.SqlConnection
Dim oCommand As System.Data.SqlClient.SqlCommand
' Création de la connexion
oConnection = New System.Data.SqlClient.SqlConnection()
oConnection.ConnectionString = System.Configuration.ConfigurationManager.AppSettings("SqlServer")
' Ouverture de laconnexion
oConnection.Open() |
un coup de pouce s'il vous plait:oops:
Problème de connection (ConnectionString)
Bonsoir. Je suis débutant sur ASP.Net et je travaille avec l'outil WebMatrix. J'ai une erreur (La propriété ConnectionString n'a pas été initialisée.) que je comprends pas. Une portion de mon code est:
Code:
1 2 3 4 5 6 7 8 9 10 11 12
| ' Déclaration des différents objets
Dim oConnection As SqlConnection
Dim oCommand As SqlCommand
Dim oDataReader As SqlDataReader
Dim sSQL As String
' Création de notre connexion
oConnection = New SqlConnection()
oConnection.ConnectionString = ConfigurationSettings.AppSettings("SqlServer")
' Ouverture de la connexion
oConnection.Open() |
Merci de m'aider. Merci!