Simple Query using subsonic 2.2 with Oracle.dataclient error
I am using subsonic 2.2 with Oracle provider. I can use active record but my simple query does not work!
int record = new Select(VenApplication.ApplicationidColumn).From(VenApplication)().GetRecordCount();
The error that I received is:
ORA-00923: FROM keyword not found where expected Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception D开发者_StackOverflowetails: System.Data.OracleClient.OracleException: ORA-00923: FROM keyword not found where expected
Source Error:
Line 23: //int records = new Select(Product.ProductIDColumn, Product.ProductNameColumn). Line 24: // From().GetRecordCount(); Line 25: int record = new Select(VenApplication.ApplicationidColumn).From().GetRecordCount(); Line 26: //int records = new Select(VenApplication.ApplicationidColumn).From().GetRecordCount(); Line 27: }
Source File:
d:\myDoc2009\Visual Studio 2008\WebSites\UiaVendor\Default.aspx.cs Line: 25
You need to specifiy the table name,
Select(VenApplication.ApplicationidColumn).From(VenApplication).GetRecordCount();
精彩评论