locked
No error message available, result code: DB_E_ERRORSOCCURRED(0x80040E21). RRS feed

  • Question

  • 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

    Thursday, December 12, 2013 9:01 AM

Answers

  • User1740231301 posted

    Hi Eren

    basically its a connection string problem try to change Integrated Security=SSPI"

    This error occur because the OleDbProvider needs you to inform which provider it will use for Integrated Security, and by putting "true" in this parameter you are not really telling which provider it should use.

    Thus, in order to use Integrated Security with OleDb, you just have to inform that it should use the Security Service Provider Interface (SSPI) in your connection string:

    "Provider=SQLOLEDB;Data Source=ServerName\Instance;Initial Catalog=DatabaseName;Integrated Security=SSPI"

    solution provided here

    http://www.vbforums.com/showthread.php?507130-Counting-Particular-Letter-Occurrences-in-a-String

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Thursday, December 12, 2013 9:35 AM

All replies

  • User1740231301 posted

    Hi Eren

    basically its a connection string problem try to change Integrated Security=SSPI"

    This error occur because the OleDbProvider needs you to inform which provider it will use for Integrated Security, and by putting "true" in this parameter you are not really telling which provider it should use.

    Thus, in order to use Integrated Security with OleDb, you just have to inform that it should use the Security Service Provider Interface (SSPI) in your connection string:

    "Provider=SQLOLEDB;Data Source=ServerName\Instance;Initial Catalog=DatabaseName;Integrated Security=SSPI"

    solution provided here

    http://www.vbforums.com/showthread.php?507130-Counting-Particular-Letter-Occurrences-in-a-String

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Thursday, December 12, 2013 9:35 AM
  • User113230323 posted

    Thanks for this solution Smile

    Tuesday, December 31, 2013 7:45 AM