locked
search data from access database RRS feed

  • Question

  • User-929039556 posted

    public DataTable Search(string param )
    {

    Parameter.con.Close();
    Parameter.con.Open();
    DataTable dt = new DataTable();

    OleDbDataAdapter da = new OleDbDataAdapter("SELECT * FROM User WHERE NoUser + ' ' + NameUser +' ' + LoginUser + ' ' LIKE N'%" + param + "%'", Parameter.con);

    da.FillSchema(dt, SchemaType.Source); //error in this ligne
    da.Fill(dt);
    Parameter.con.Close();
    return dt;


    }

    Friday, March 13, 2015 7:33 PM

Answers

  • User61956409 posted

    Hi amadou11,

    Thanks for your post.

    Firstly, as Mike said, please show us your error message.

    Secondly, you could refer to this article to retrieve data from a Microsoft Access database.

    Best Regards,

    Fei Han

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, March 16, 2015 3:20 AM

All replies

  • User-821857111 posted

    //error in this ligne

    What error?

    Saturday, March 14, 2015 3:50 AM
  • User61956409 posted

    Hi amadou11,

    Thanks for your post.

    Firstly, as Mike said, please show us your error message.

    Secondly, you could refer to this article to retrieve data from a Microsoft Access database.

    Best Regards,

    Fei Han

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, March 16, 2015 3:20 AM