what is the best way to get the exact result of the query in SqlLite?

class cDetails
[PrimaryKey ,AutoIncrement , Column("ID") ]
public int ID { get; set; }
public string departmentID { get; set; }
[Column("COURSE CODE")]
public string courseCode { get; set; }
[Column("COURSE TITLE")]
public string courseTitle { get; set; }
public double credits { get; set; }

    public override string ToString()

        return string.Format("{0} {1}\t{2}\t{3}\t\t\t{4}", ID, departmentID, courseCode, courseTitle, credits);

when i use the query to access the data in the table with this command _SQLiteConnection.Query("SELECT * FROM [cDetails]");

I'm able to get the result set in the formated way in that ToString() but when i try to access other data using other Query like _SQLiteConnection.Query("SELECT [COURSE CODE] from [cDetails]");

The application stops debugging.

what is the way to get the corresponding results to my queries ?

Thank you

Sign In or Register to comment.