01private static void GetPilotsSODA() 02
{ 03
Console.WriteLine("Retrieving Pilot objects: SODA"); 04
IObjectContainer oc = Db4oFactory.OpenClient("localhost", 0xdb40, "db4o", "db4o"); 05
try 06
{ 07
IQuery query = oc.Query(); 08
09
query.Constrain(typeof(Pilot)); 10
query.Descend("_points").Constrain(5); 11
12
IObjectSet result = query.Execute(); 13
ListResult(result); 14
} 15
finally 16
{ 17
oc.Close(); 18
} 19
}
01Private Shared Sub GetPilotsSODA() 02
Console.WriteLine("Retrieving Pilot objects: SODA") 03
Dim oc As IObjectContainer = Db4oFactory.OpenClient("localhost", &HDB40, "db4o", "db4o") 04
Try 05
Dim query As IQuery = oc.Query 06
query.Constrain(GetType(Pilot)) 07
query.Descend("_points").Constrain(5) 08
Dim result As IObjectSet = query.Execute 09
ListResult(result) 10
Finally 11
oc.Close() 12
End Try 13
End Sub