views:

60

answers:

0

Hi

I'm writing a proof of concept and when using InlineQuery() or CodingHorror() I get an error stating my target table is an invalid object. However, if I use Query() using the same SQL Select statement and connection string, I get results as expected.

Here's the code:

string sql = @"SELECT * FROM PER_ALL_PEOPLE_F WHERE ROWNUM <= 10";
// Gets my results
PerAllPeopleFCollection people = OracleData.DB.Query().ExecuteAsCollection<PerAllPeopleFCollection>(sql);

// These two error
PerAllPeopleFCollection people1 = new InlineQuery().ExecuteAsCollection<PerAllPeopleFCollection>(sql);
PerAllPeopleFCollection people2 = new CodingHorror().ExecuteAsCollection<PerAllPeopleFCollection>(sql);

The error: Invalid object name 'PER_ALL_PEOPLE_F'

Any ideas about why this is occuring? Am I doing something wrong here?

Any advice would be greatly appreciated.

Regards,

Lee