Data Loading in datagrid is too slow

Feb 7 2009 5:08 AM

Hi All My Friends

I Connect to DB (Oracle) and execute a select Command (From table that has very records for example 1000000 records) then load in DataGrid in C sharp.it does successfully but very very slowly.

---------------

DataSet ds = new DataSet();

String constr             = p_ConnectionStr;

String CommandStr ="SELECT * FROM MTL_SYSTEM_ITEMS";

System.Data.OracleClient.OracleConnection ConOracle = new System.Data.OracleClient.OracleConnection(constr);

System.Data.OracleClient.OracleCommand ComOracle = new System.Data.OracleClient.OracleCommand(CommandStr, ConOracle);

System.Data.OracleClient.OracleDataAdapter AdpOracle = new System.Data.OracleClient.OracleDataAdapter(CommandStr, ConOracle);

ConOracle.Open();
ComOracle.ExecuteScalar();
AdpOracle.Fill(ds, "MTL_SYSTEM_ITEMS");
ConOracle.Close();

---------------

Please Help Me to Find Solutions for solve the Problem.

Best Regards

BABAK


Answers (3)