bonjour, voilà j'ai un problème,la requete de ce code ne s'execute pas et je ne comprends pas pourquoi. La syntaxe de la requete est bonne, je l'ai récuperé sous forme de variable, je l'ai affiché puis je l'ai testé sous sql server 2005. En plus, il me dit qu'il y a bien 1 affectedrows...
Merci à tous de votre aide!
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9 Dim nom_connexion As New Data.SqlClient.SqlConnection nom_connexion.ConnectionString = WebConfigurationManager.ConnectionStrings("bizoneConnectionString1").ToString Dim myCommand As New Data.SqlClient.SqlCommand("UPDATE [C:\INETPUB\WWWROOT\A\APP_DATA\BIZONE.MDF].[dbo].[config] SET [prefixe_groupe] = '" & TextBoxpref_gpe.text & "',[url_historique] ='" & TextBoxurl_histo.text & "'", nom_connexion) 'Execution nom_connexion.Open() Dim affectedrows As Integer = myCommand.ExecuteNonQuery() label2.text = "" & affectedrows nom_connexion.close() True)
Partager