DataSet search colum for specific string using Select()

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • istimac
    New Member
    • Oct 2013
    • 1

    #1

    DataSet search colum for specific string using Select()

    General idea is to add ASCII data from text file to existing data in DataSet, first string of txt file is the same as DataSet column, but not in the same order.

    I try to search one colum for specific string and add data to it. I get error message "cannot interpret token ""......"

    I tryed to search rows using DataSet.Tables[].Select()

    search string is "column = 'searchstring'"
    brtoc is column in DataSet, ucitavanje_brto c is the same string from ASCII file.

    string a = "\"brtoc" + " " + "=" + " " + "'" + ucitavanje_brto c + "'" + "\"";
    MessageBox.Show (a); //just to see if output string is ok

    DataRow addbazaRow = gui1DataSet.Tab les["baza"].Select(kriteri j).FirstOrDefau lt();

    // code to add data to existing row

    What am i doing wrong?


    Thank You

    note: this is my first project in VS, and i'm a noob :)
    sorry for my bad english
Working...