c# - How to convert to System.Int32 when doing a select from a DataTable -
i've got datatable i've loaded csv file using kbcsv library . can tell columns numbers in csv file , there aren't null rows. want select on data table query i've created using string.format. here's query: string qry = string.format("gridx = {0} , gridy = {1} , convert([{2}], 'system.int32') {3} {4}", xc, yc, _testdatacolumn, _comparison, _threshold); where xc double, yc double, _testdatacolumn string, _comparison string , _threshold double. table.select() method converts string to: gridx = 0 , gridy = 4 , convert([st devssi(dbm)], 'system.int32') = 5 i put convert in there because before getting a cannot perform '=' operation on system.string , system.int32 error message. i've looked @ this help. don't understand how last column (st devssi) became string. doing conversion correctly? there way take care of such errors? if run code sample csv file should same error when searches coordinates (0, 4) looks