1
Answer

Select from datatable created by program

Pramod Shivhare

Pramod Shivhare

12y
1.2k
1
I am using a datatable created by program. In this datatable i want to insert values in some specified columns.


Initially I am inserting primary key values leaving remaining columns null, when I am querying datatable with recently inserted value in Primary column to update same row, I am facing error  `Missing operand after ID operator`


Can any one tell me the exact issue.


I am trying following code:


       

     dt.Rows.Add(1);

     int insertedValue = 1;
     DataRow[] dr = dt.Select("ID = '" + insertedValue.toString() + "'");


And the table structure after entring primary value is as follows.


    ID    Volumn1    Volumn2    volumn3
    --------------------------------------
    1




                           
Answers (1)