Hi, I am using ASP.NET to make a website, for the first time and I am programming with C#.

When using this code:

var query = SQL.Query("SELECT * FROM campaign");

foreach(var key in query){

I get this error: CS1579: foreach statement cannot operate on variables of type 'object' because 'object' does not contain a public definition for 'GetEnumerator'

Inspect what kind of class/object SQL.Query returns. It must be enumerable to be able to use foreach.