G
Guest
this is my database query in my application
string strSQL = "select AB_CD from MY_TABLE where AB_FIELD1_NAME ='NULL' and AB_FIELD2_NAME = '" + xyz + "' "
string strKey = object.ExecuteScalar(strSQL).ToString()
here AB_CD is a primary key that i want to get from the above query, iam getting a exception here if i execute this query
the database record row will be like thi
AB_CD AB_FIELD1_NAME AB_FIELD2_NAM
124 NULL xyz
how to reference null value in a database query? is it because the way i gave the exception is occurin
string strSQL = "select AB_CD from MY_TABLE where AB_FIELD1_NAME ='NULL' and AB_FIELD2_NAME = '" + xyz + "' "
string strKey = object.ExecuteScalar(strSQL).ToString()
here AB_CD is a primary key that i want to get from the above query, iam getting a exception here if i execute this query
the database record row will be like thi
AB_CD AB_FIELD1_NAME AB_FIELD2_NAM
124 NULL xyz
how to reference null value in a database query? is it because the way i gave the exception is occurin