Returning all fields in a query?

Nov 20, 2012 at 5:59 PM

Does anybody know of a (convenient) way to return all fields (columns) from the database in a query? I tried omitting the Fields parameter, but I receive the error "No Fields were specified to be selected".

Thanks!

Coordinator
Nov 21, 2012 at 6:51 AM

Hi

You can use either

 

DBQuery.SelectAll().From(TableName)

Or 

DBQuery.Select().Field(DBField.AllFields())

The SelectAll has one overload to specify a table name.

DBQuery.SelectAll(FirstTable)
		.From(FirstTable).InnerJoin(SecondTable)
		.On(....

The DBField.AllFields() method has two overloads in case you need to specify the schema owner.