In first method you have not closed ')' properly. you are missing one Close')' at the end of query and also missing ';'.
I think you should try this as well.
static void Main()
string connstr = "User Id=ID;Password=Pass;Data Source=SourceName";
OracleConnection con = new OracleConnection(connstr);