Hi friends...
I have some problem here...
I have 1 web form. in that web form empid .empname ,salary .address fields and one save button is there . when ever click the button , i want save values in the DB emp table. for that
i wrote code in button click event code behind page.......
protected void Button1_Click(object sender, EventArgs e)
{
con = new OleDbConnection("Data Source=.;Initial Catalog=emp;Integrated Security=True");
con.Open();
cmd = new OleDbCommand ("INSERT INTO emp values ( '"+TextBox1 .Text+ "','"+TextBox2 .Text+ "','"+TextBox3 .Text+"','"+TextBox4 .Text +"'",con);
cmd.ExecuteReader();
con.Close();
}
but error is ...................
System.ArgumentException was unhandled by user code
Message="An OLE DB Provider was not specified in the ConnectionString. An example would be, 'Provider=SQLOLEDB;'."
Source="System.Data"
Srinivasulu Enugu