Hi, Yeah kindly find the list of errors below which are fired when i use this piece of code. This is my code : private: System::Void Form1_Load(System::Object * sender, System::EventArgs e) { System::String * SqlStr; ListView * listView1 = new ListView(); try { SqlStr = "Select IC, Part_Code, PART_NUMBER, PART_NAME from vdcsssp_PARTS_mst" ; SqlCommand* objCmd = new SqlCommand(); SqlDataAdapter* objDA = new SqlDataAdapter(); DataSet* objDS = new DataSet(); SqlConnection* objCon = new SqlConnection(); objCon->ConnectionString = "User ID=sa;pwd=qil2004;Data Source=qipl-server;Initial Catalog=Qvdcsssp"; if(objCon->get_ConnectionString() != "") { objCon->Open(); objCmd->CommandText = SqlStr; objCmd->Connection = objCon; objDA->SelectCommand = objCmd; objDA->Fill(objDS); } else MessageBox::Show("Error connection Failed"); return; for each (DataRow* r in objDS->Tables[0]->Rows) { //Create a listView Item and add the first column of the dataset to it ListViewItem* lvindex = gcnew ListViewItem(r[0]->ToString()); //Create a subitem and add the seconed column to it ListViewItem::ListViewSubItem* sublvindex = gcnew ListViewItem::ListViewSubItem(lvindex,r[1]->ToString()); //Add the 1st subitem to the listview item listView1->SubItems->Add(sublvindex); //Create the seconed ListView SubItem and add the third column of the Dataset to it. sublvindex = gcnew ListViewItem::ListViewSubItem(lvindex,r[2]->ToString()); //Add the 2nd subitem to the listview item listView1->SubItems->Add(sublvindex); //Add the entire ListViewItem to the next available row in myListView listView1->Items->Add(lvindex); } } catch(Exception* ex) { MessageBox::Show(ex->Message); } ----------------------------------------------------------------------------- This is my errors: e:\Sandeep\VC++ .Net\Test1\Form1.h(376) : error C2061: syntax error : identifier 'each' e:\Sandeep\VC++ .Net\Test1\Form1.h(377) : error C2143: syntax error : missing ';' before '{' e:\Sandeep\VC++ .Net\Test1\Form1.h(379) : error C2065: 'gcnew' : undeclared identifier e:\Sandeep\VC++ .Net\Test1\Form1.h(379) : error C2146: syntax error : missing ';' before identifier 'ListViewItem' e:\Sandeep\VC++ .Net\