views:

141

answers:

1

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 got 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 Details: 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

A: 

You need to specifiy the table name,

Select(VenApplication.ApplicationidColumn).From(VenApplication).GetRecordCount();
Pino
Actually that what i did. <>
colman wells
my command is actually Select(VenApplication.ApplicationidColumn).From<VenApplication>.().GetRecordCount();
colman wells
Well Try : Select(VenApplication.ApplicationidColumn).From(VenApplication).GetRecordCount();
Pino
Did this work..?
Pino
Shouldn't the syntax be: Select(VenApplication.ApplicationidColumn).From(VenApplication.Schema).GetRecordCount();
Adam
Yes that solve it. Thanks
colman wells