Ora-01036 illegal variable name/number

sad55Mauvyche Messages postés 8 Statut Membre -  
chico200987 Messages postés 856 Statut Membre -
Bonjour,
Je suis entrain de développez un programme et je rencontre ce problème lors de création d'un requête d'ajout.l'ajout marche si le code est statique.

Code c# :



public void Enregistrer()
{
try
{
OracleConnection connection = Connexion.connecter();
OracleCommand command = new OracleCommand();
string requete = "INSERT INTO GESCMS_PAL.CATEGORIE (ID_CATEGORIE,LIBELLE,DESCRIPTION) VALUES(@id_categorie,@libelle,@description)";
command.Connection = connection;
command.CommandText = requete;
command.Prepare();
command.Parameters.AddWithValue("@id_categorie", this.id_categorie);
command.Parameters.AddWithValue("@libelle", this.libelle);
command.Parameters.AddWithValue("@description", this.description);
command.ExecuteNonQuery();
MessageBox.Show("Enregistrement effectué avec Succès");
connection.Close();
}
catch (OracleException ex)
{
MessageBox.Show("erreur:"+ex.ToString());
}
}
A voir également:

1 réponse

chico200987 Messages postés 856 Statut Membre 144
 
Salut,

As-tu pense a verifier ce que valent tes variables this.id_categorie, this.libelle et this.description avant l'execution de la requete ?

0