User113230323 posted
Hi. Everyone
i am make a asp.net project but i came up a problem. "No error message available, result code: DB_E_ERRORSOCCURRED(0x80040E21)." when i save profile datas to database, every time this message came my screen.
codes;
public OleDbConnection baglan = new OleDbConnection(@"Provider=SQLOLEDB;Data Source=.\SQLEXPRESS;AttachDbFilename=C:\Users\Eren\Documents\Visual Studio 2012\WebSites\aspnet\App_Data\aspnet.mdf;Integrated Security=True");
protected void btnRegis_Click(object sender, EventArgs e)
{
if (baglan.State == System.Data.ConnectionState.Closed)
{
baglan.Open(); // program down this section
}
OleDbCommand komut = new OleDbCommand("Insert into [kullanici] (kuladi,sifre,adi,soyadi,yetki,email) values (@kuladi,@sifre,@adi,@soyadi,2,@email)",baglan);
komut.Parameters.Add("@kuladi", txtUsname.Text);
komut.Parameters.Add("@sifre", txtPass.Text);
komut.Parameters.Add("@adi", txtName.Text);
komut.Parameters.Add("@soyadi", txtSurname.Text);
komut.Parameters.Add("@email", txtEmail.Text);
komut.ExecuteNonQuery();
baglan.Close();
}
i know, my english is very bad but i try to explain my problem, i hope, you can help me. Thanks