Escolar Documentos
Profissional Documentos
Cultura Documentos
Side 1
12-10-2009
2009 Tutorial (DB4O and Visual Studio 2008 Express) ...............................................1 Download the Database .............................................................................................1 Installation of the Database........................................................................................2 Creating the project in VS..........................................................................................3 Pointing VS to the DB4O ..........................................................................................4 Creating the Database ................................................................................................5 Create two Objects and put them in the Database .....................................................6 The big code example ................................................................................................8
Side 2
12-10-2009
Side 3
12-10-2009
Side 4
12-10-2009
And then find the Db4objects.Db4o.dll file from the net-3.5 folder, and double click. Now this project can use using Db4objects.Db4o.
Side 5
12-10-2009
It is important that you Save the project first. Than run it by taping Ctrl and F5. After this you should be able to find a file called DB4Ofile in the same folder that the project is stored. If not, there is something wrong. I shall assume that all went fine, and continue.
Side 6
12-10-2009
Side 7
12-10-2009
The first output is 2 object, and if you run it again it will show 4 objects in the database two Michael and 2 Rubens. So for every time you run it add 2 objects.
Side 8
12-10-2009
Side 9
12-10-2009
public class Pilot { public String name; public int trips; private Team team; public Pilot(String s, int i) { name = s; trips = i; } public void setTeam(Team t) { team = t; } public Team getTeam() { return team; } public String getName() { return name; } public int getTrips() { return trips; } public void printName() { Console.WriteLine("Mit navn er: " + name); } } public class Team { private String TeamName; public Team(String s) { TeamName = s; } public String getTeamName() { return TeamName; } public void printTeamName() { Console.WriteLine("This is team: " + TeamName + " test"); } } }
I hope that this was a simple and quick tutorial to get started with DB4O from VS. Thanks. www.jakupwhansen.dk