Je ne peux pas appeler la valeur d'un textBox
pour l'utiliser comme adresse IP.C# CHAINE DE CONNEXION SQL UTILISANT LA VALEUR DE TEXTE
private void IDSearch() {
DataTable dt = new DataTable();
SqlConnection sqlConnection2 = new SqlConnection(@"Server='" + txtIPReal.Text +
"';Database=xstore;User Id=user;Password=pass;");
cmd3 = sqlConnection2.CreateCommand();
cmd4 = sqlConnection2.CreateCommand();
try {
sqlConnection2.Open();
// sql code here
}
catch (Exception) {
// exception handling here
}
}
Il détecte une erreur. Quelqu'un peut-il m'aider?
Quelle erreur/exception avez-vous attraper? – koceeng
peut vous fournir cette erreur – Usman
point à mon attraper –