Subject search table by array value using parameters
Author Arthur

//In firebird example database "employee" is table 'job'

//with string[] column 'language_req'


// i have some code:


fbcmd.CommandText = "select language_req from job where job_code="SRep";

fbreader = fbcmd.ExecuteReader ();


Array array_value;


if (fbreader.Read ())

array_value = (Array)fbreader[0];

fbreader.Close ();


fbcmd.CommandText = "select * from job where language_req = @par1";

fbcmd.Parameters.AddWithValue ("@par1",array_value);

fbreader = fbcmd.ExecuteReader (); // ERROR -> Cannot cast from source type to destination type


//is this code wrong ?

//what is solution for searching table by array values ?