Visual Studio and EVE Applications
I've set myself the task of developing an EVE application using Visual Studio and this article (or series of articles) will map my progress on this journey.
The application I will work on is intended as a primer for me and also for you if you intend to follow my progress. So lets keep it simple and just try to get something working before diving in to build the 'killer' app of your dreams. Let us raise the bar a little here and try to do better than 'just try to get something working' - let us try to really understand all the processes involved in building the primer and this will give us a strong platform on which to tackle something more elaborate.
This will be no easy task for me as my experience of Visual Studio is minimal and my previous experience of Visual Basic, C#, SQL Servers etc could be written on the back of a stamp. However I do have experience of MySQL and PHP so I am not so much having to learn database manipulation and programming from scratch but more of learning the specifics of MSSQL and Visual Studio.
Let's start by collecting the utilities we need.
First Steps
The first thing we need to do is download the various tools required if you don't already have them. I started with no tools installed and have had to source all the applications and resources necessary - not as straightforward a task as it may first appear. However after a bit of reading and research and more than a little trial and error I worked out the minimum requirements I needed and the desirable elements I wished to use.
At each stage of installing the various components listed below I would suggest rebooting your PC as some elements are not completely installed until you restart. It shouldn't be necesary to reboot after importing the EVE database.
Visual Studio 8
This is available as a 90 day trial with no restrictions from HERE. I have the advantage of being a mature student at the Open University in the UK so I purchased the Academic version for £100 from Amazon.co.uk - to be honest there were no checks done on my eligibility so the choice is yours!
View here for the Visual Studio 8 installation requirements and known issues to ensure your PC is capable of using the package.
SQL Server
Along with Visual Studio 8 we will need the SQL Server package. This comes bundled in the Academic and 90 Day Trial versions of Visual Studio 8 as SQL Server 2005 which is not entirely ideal but it does present a starter.
However you can upgrade Visual Studio 8 with Service Pack 1 which makes it compatible with SQL Server 2008 which is far more useful as it allows the easy import and export of SQL files - which is the format in which the EVE database is released by CCP and the format we will use to build our application.
Service Pack 1 is a very large file of some 340MByte so this will take a bit of time to download to your PC. However it is a very worthwhile download and highly recommended. Proceed to download and install SP1 before moving on to install SQL Server 2008.
When you run the installer for SQL Server 2008 there may be a message regarding 'compatibility issues'. I selected to Run Program and it installed without apparent errors. Your installation may differ so check what compatibility issues exist and if nothing serious then 'Run Program'. On the menu page that appears select 'Installation' and a further menu appears with an option to upgrade from SQL Server 2000 or SQL Server 2005 - the 2005 version was installed by default with the Visual Studio 8 installation. Select the option to upgrade and let the installer do its work.
SQL Server Management 2008
This package provides a graphical configuration tool for creating and manipulating SQL databases and is available HERE.
Once you have installed SQL Server 2008 you should be ready to install the SQL Server Management 2008 package. Again a message may appear regarding 'compatibility issues' and the option to check online. Again I elected to Run Program and the package installed with no apparent errors.
The installation can be quite confusing as this will run the SQL Server 2008 package again and and you will see the same menu structure as before. Click 'Installation' and you will see the same page as before with the upgrade option only this time you will now select to 'Add Features'. The installer will run and show the install options for the Management Tools package - you should check the box for this and click to install.
If you had already had some of these packages installed and had an installation of the SQL Server Management 2005 package at some point you will need to uninstall and remove this to allow the SQL Server Management 2008 package to install..
EVE Database
After every release of a new update to EVE there is a corresponding release of the static database which holds details of planets, stars, equipment, blueprints, ships, agents and much much more. CCP posts the new release to the forums and in a MSSQL backup file format so it is very easy to import to your PC using the SQL Server Management Suite. Additionally there will be a release of an image file in the same forum post which contains thumbnails, icons, and larger images of ships, blueprints, stations and more. This can be used in conjunction with the database to enhance your application.
Using this database and applying queries programmatically can provide a wealth of information which you can use to determine features such as the material requirements a Blueprint needs to produce a ship or the agents and agent types in a given system. The results pulled from the database can be displayed in a pleasing output to a window determined by your design in Visual Studio.
So given an idea of what information you wish to retrieve you can display and manipulate data to produce results for a wide variety of uses.
For our purposes we will use the EVE database and as we develop the application we will use the EVE API and also bring information in from third party resources such as Eve-Metrics to display prices. This is part of a follow up article but initially we will start with installing the full static database on your own PC.
Small applications can use a reduced set of tables from the full static database so if you planned to release your work to the public it makes the package reasonably small and quick to download. There are not many (if any) that would require the application to include the full static EVE database and if they did the package would be immense - perhaps a 100Meg download even when zipped if you included images.
The EVE database is avalable HERE
This zip file contains two files - ebs_DATADUMP.sql and Dominion_1.1.1_31766_db.bak and it is the latter (bak) file we will use.
Creating the Database
In the SQL Server Management package (SSMP) we will create the database. If not already running then start the SSMP. If this is the first time use it will indicate this onscreen while it connects to the SQL Server you installed with SQL Server 2008.
When the processing is complete a directory structure should appear with the name of your SQL Server with 'Databases', 'Security', 'Server Objects', 'Replication' and 'Management'. Click on the + next to 'Databases' and a default database will show as 'System Databases' which you can ignore.
We wish to restore a Database so right click on 'Databases' and select 'Restore Database'. A configuration screen will appear where you can specify the name of a new or existing database and also determine where you are going to restore from.
In the 'To database' type in the name of your new database e.g. EveData and using the 'From Device' option will allow you to point to a file on your disk drive. Select 'From Device' and click on the '...' box which brings up a further screen asking you to 'Specify the backup media...' - this will be a file which is the default and you need to point to a location so click on 'Add' to find a backup location this database will use.
The 'selected path' should default to C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Backup but if you installed SQL Server 2008 somewhere else then your path may vary.
Rather than go hunting every time I wanted to find a backup I elected to stay with the default path and had moved the CCP downloaded .bak file to this default location when I downloaded the files and unzipped it. So when I came to restore the database I now see this file listed in the default backup location and selected this as the file to use. I ended up with:
C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Backup\Dominion_1.1.1_31766_db.bak
Click 'OK' and you will now see this path and file listed in the 'Specify Backup' screen. Click 'OK' again and you now return to the 'Restore Database' screen. You now have to select this backup set to restore - in future you may well have dozens of backups listed and you need to specifiy which is to be used - right now there is only one backup file listed. Click on the box next to the backup you just configured and a 'tick' appears. You are now ready to install the CCP backup file to your new EveData database.
Click 'OK' and you should see the progress meter begin to rotate as it imports and configures your new database. When complete a screen appears to inform you the database is successfully installed. Click 'OK' and your new database is now listed in the main menu. Click on the + next to EveData and again on the + next to Tables and you should see the list expand to show dbo.agtAgentTypes and dozens more tables below this.
To test if the tables are constructed correctly and do contain data we will run a small SQL query. Click on 'New Query' and ensure you select your new database (EveData) in the selector box that appears.
Copy and paste the following into the panel that appeared in the centre of the screen - the SQLQuery1.sql is the query file that holds the text and is saveable when you close the screen should you wish to keep the query for later use.
SELECT ss.stationName FROM staStations ss
INNER JOIN staOperationServices so ON ss.operationID=so.operationID
INNER JOIN staServices sv ON so.serviceID=sv.serviceID
INNER JOIN eveNames n ON ss.regionID=n.itemID
WHERE sv.serviceName='Cloning' AND n.itemName='Verge Vendor'
Click on 'Execute' and the query will run to find a station with 'Cloning' service in 'Verge Vendor' region
The following listing should appear:
| stationName |
|---|
| Reblier IV - Republic Security Services Logistic Support |
| Masalle VII - Moon 17 - Republic Security Services Logistic Support |
| Masalle IX - Republic Security Services Logistic Support |
| Vaere III - Moon 1 - Republic Security Services Logistic Support |
| Alentene VI - Moon 16 - Poteque Pharmaceuticals Biotech Research Center |
| Tourier I - Poteque Pharmaceuticals Biotech Production |
| Scheenins IV - Chemal Tech Factory |
| Scheenins V - Moon 8 - Chemal Tech Factory |
| Alenia V - Duvolle Laboratories Factory |
| Alentene V - Moon 4 - Duvolle Laboratories Factory |
| Vaere VII - Duvolle Laboratories Warehouse |
| Alenia IV - Moon 3 - Quafe Company |
| Eletta VIII - Moon 19 - University of Caille School |
| Scolluzer VII - Moon 1 - University of Caille School |
| Scolluzer VII - Moon 2 - Federation Navy Logistic Support |
| Reblier VI - Federation Navy Logistic Support |
| Masalle VI - Moon 9 - Federation Navy Logistic Support |
| Costolle III - Moon 1 - Federation Customs Logistic Support |
| Ekuenbiron VII - Moon 12 - Federation Customs Logistic Support |
| Ekuenbiron VI - Federation Customs Logistic Support |
| Sortet VI - Moon 5 - DED Logistic Support |
| Reblier VIII - Moon 7 - DED Logistic Support |
| Scolluzer VI - DED Logistic Support |
| Eletta VII - Moon 7 - DED Logistic Support |
| Scolluzer VII - Moon 3 - Federal Navy Academy School |
| Ouelletta V - Moon 5 - Federal Navy Academy School |
| Cistuvaert V - Moon 12 - Center for Advanced Studies School |
| Adallier II - Center for Advanced Studies School |
| ChannaceChannace III - Moon 3 - Center for Advanced Studies School |
| Clacille IV - Center for Advanced Studies School |
| Clellinon VI - Moon 11 - Center for Advanced Studies School |
| Costolle V - Federal Defence Union Logistic Support |
| Ouelletta II - Federal Defence Union Logistic Support |
| Jufvitte IV - Federal Defence Union Logistic Support |
| Aidart IV - Federal Defence Union Logistic Support |
To view more SQL queries visit this page - Visual Studio and EVE Sample SQL Queries
CONGRATULATIONS!!!!
You now have the SQL Server 2008 package installed and running and you also have the SQL Server Management package installed and running and you have also created your first database and restored the CCP data backup.
Take a deep breath - have a coffee or tea or something stronger and give yourself a pat on the back.
Now we are ready to begin using Visual Studio to interrogate the database and to use the results to display something useful.
The next part of this article will begin building a simple EVE application using Visual Studio 8 in a step-by-step process.
/.... to be continued
| < Prev | Next > |
|---|
Classified Admenu
Classified Search
Classified Top Five
- Website Hosting and Domain Registration (EVE Online Services / Website Facilities) Tuesday, 04 January 2011
- Lion's CHEAP POS Fuel Delivery Service (EVE Online Services / POS Fueling) Sunday, 10 January 2010
- High Sec Corp standings + Alliance creation (EVE Online Services / Corp/Ally Services) Sunday, 10 January 2010
- Gallente & Minmatar Standing, Corp Creation, POS Services (EVE Online Services / Standing Services) Sunday, 10 January 2010
- Okawa's Researched BPO (EVE Online Shops / BPO Stores) Monday, 15 February 2010
Visitor Locations
Countries
| 35.8% | | United States |
| 20% | | United Kingdom |
| 7.1% | | Germany |
| 3.1% | | Netherlands |
| 2.9% | | India |
| 2.9% | | Australia |
| 2.7% | | Canada |
| 2.7% | | France |
| 1.4% | | Sweden |
| 1.2% | | Japan |
Visitors
| Today: | 15 |
| Yesterday: | 28 |
| This Week: | 50 |
| Last Week: | 321 |
| This Month: | 287 |
| Last Month: | 1432 |
| Total: | 13059 |
Latest Comments
- 2011-07-19 18:28:59 ...
Thank you so much for the detailed in...
- 2011-07-19 18:28:42 ...
Great tutorial, KB's made easy! Th...
- 2010-03-10 22:16:33 ...
A truly tragic tale and a timely remi...
- 2010-02-19 05:38:38 ...
This is a great little guide for the ...
- 2010-02-19 05:37:55 ...
No one gets very far in EVE without I...



Thank you so much for the detailed instructions. You are my hero!