0

im new in here so i have a question to ask.. the sql oracle say this error ORA-00917: missing comma . hope have some solution

 cmd = new OleDbCommand("INSERT INTO users (Matricule,mot_de_passe,Nom,Prenom) VALUES(?Matricule,?mot_de_passe,?Nom,?Prenom)", con);
        cmd.Parameters.AddWithValue("?Matricule", textBox1.Text);
        cmd.Parameters.AddWithValue("?mot_de_passe", textBox2.Text);
        cmd.Parameters.AddWithValue("?Nom", textBox3.Text);
        cmd.Parameters.AddWithValue("?Prenom", textBox4.Text);
asma
  • 1
  • 4
  • possible duplicate of [What's wrong with these parameters?](http://stackoverflow.com/questions/1216271/whats-wrong-with-these-parameters). [From the OleDbCommand.Parameters docs](https://msdn.microsoft.com/en-us/library/system.data.oledb.oledbcommand.parameters.aspx): `The OLE DB .NET Provider does not support named parameters for passing parameters to an SQL statement or a stored procedure called by an OleDbCommand when CommandType is set to Text. In this case, the question mark (?) placeholder must be used.`. – Bob Jarvis - Слава Україні Sep 12 '15 at 16:41
  • it works :)) thnx :)) – asma Sep 12 '15 at 16:46

0 Answers0