hi all
I had make this samll method to insert data from c# forms into my oracle database the code processed fine but when I go to
sql developers software to check if the record has been inserted or not I found nothing...
so whats wrong with it please
thanks all,
public void conn2db()
{
try
{
string connstring = "data source=test_db;user id=system;password=password;";
string statmentcmd = "insert into register_user (userid,username,pass,fullname,phonenum,gender,country) values (" + 1 + "," + textBox1.Text + "," + textBox2.Text + "," + textBox4.Text + "," + textBox5.Text + "," + radioButtonValue+ ","+comboBox1.Text+");";
OracleConnection conn = new OracleConnection(connstring);
conn.Open();
MessageBox.Show("connected to database");
OracleCommand cmd = new OracleCommand();
cmd.CommandText=statmentcmd;
cmd.Connection=conn;
OracleDataAdapter oda = new OracleDataAdapter(cmd);
MessageBox.Show(statmentcmd);
conn.Close();
MessageBox.Show("Connection closed");
}
catch (Exception ex)
{
MessageBox.Show(ex.ToString());
}
}