Thursday, August 11, 2016

(#5) C# Printings using Printing Controls In Urdu - Load Data From MS Access Database

11 comments:

  1. Sir when adding resources And i select My access data base then Its show some error "Some file could contain malicious content"... Choose a database Model Dialog And DataBase Objects dialog not appeared

    ReplyDelete
    Replies
    1. Can't help this from here. Search google to find solution.

      Delete
  2. private void Form1_Load(object sender, EventArgs e)
    {
    OleDbConnection conn = new OleDbConnection(@"Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Users\ACS\Documents\RetailDataBase.accdb");


    conn.Open();

    OleDbCommand objCommand = new OleDbCommand("SELECT Products.[ProductName] FROM Products;", conn);
    //objCommand.CommandText = "Select ProdcutName from Products";
    OleDbDataReader objReader;
    objReader = objCommand.ExecuteReader();

    while (objReader.Read())
    {
    //MessageBox.Show(objReader["ProductName"].ToString());
    itemcomboBox.Items.Add(objReader["ProductName"].ToString());
    }
    objReader.Close();
    conn.Close();
    }

    ReplyDelete
  3. Sir G,Because Of that error I Use This method So is it OK..

    ReplyDelete
  4. oledbexception was unhandled I facing This Problum

    ReplyDelete
  5. Hello Sir, when i try to add access database , I get error the configuration is not declared
    help me please,

    ReplyDelete
    Replies
    1. Instead of adding to Resources, just change the connection string and give location. You don't need to add it Resources.

      Delete
  6. hello Sir can we those tuto in english?

    ReplyDelete
    Replies
    1. I will create English version soon.

      Delete
    2. THANKS Sir.

      HOW CAN DO TO CONVERT THE VALUE IN LETTER.
      FOR EXAMPLE 45.280 TO FORTHY FIVE THOUSAND TWO HUNDRED EIGHTY

      Delete