Fill Into DataReader
Using Oledb
Step 1: Establishing Connection
OleDbConnection OCon=new OleDbConnection(StrCon);
//StrCon is a connection String
Step 2: Fill Into DataReader
Con.Open();
OleDbCommand OCmd=new OleDbCommand(StrQry,OCon);
OleDbDataReader Rdr=OCmd.ExecuteReader();
Using sqlclient
Step 1: Establishing Connection
SqlConnection OCon=new SqlConnection(StrCon);
//StrCon is a connection String
Step 2: Fill Into DataReader
Con.Open();
SqlCommand OCmd=new SqlCommand(StrQry,OCon);
SqlDataReader Rdr=OCmd.ExecuteReader();