These forums have been archived and are now read-only.

The new forums are live and can be found at https://forums.eveonline.com/

EVE Technology Lab

 
  • Topic is locked indefinitely.
 

Java - EVE db - connection in between

Author
Thrach Benafin
POOPOOHEAD PATROL
#1 - 2012-09-12 19:17:43 UTC
Good Evening @ll,

I've there a few issue's about my privat project. Basically I'm a beginner in java, but to extend my knowledge, and to get some experience, i thought I'll try my own eve related application.

So I've downloaded the Eve Dump: Check
and the sql server2012 & management Studio: Check
restored the database, and it can be accessed in mgmStudio: Check

We have to use netbeans in school, so i've tried to connect it with my server, but now my problem's start's.

What i've to use for a driver?
I've tried the jbdc, obcd, jbdc over obcd bridge and so on, but i wasnt be able to get an connection.

I've also tried the xampp server, sqlite. But either I can't restore the database, or i get some other strange failure's. Now @ the end of the try's, i've installed several servers, alot of driver's, and nothing is working.

Now i would like to ask the comm if I could get a hint where i should search, what tool's could be used or what is a configutation that will work.

Thx in Advance
Steve Ronuken
Fuzzwork Enterprises
Vote Steve Ronuken for CSM
#2 - 2012-09-12 19:40:34 UTC
What might be a trifle easier to work with is mysql, rather than sql server?

There's a mysql export at http://www.fuzzwork.co.uk/dump/

It's bzip2 compressed, so you'll want something like 7zip to uncompress it.

Once you have it, and mysql is installed:

connect to mysql
create database eve;
grant all on eve.* to eve@localhost identified by 'thisisawonderfulpasswordyoushouldchange';

Then exit.

Then, in the directory where you've extracted the file:
mysql eve < thedumpfilename.sql

Which should then load it.

Once that's done, the mysql JDBC driver is fairly simple to work with. (Or so I've heard)

Woo! CSM XI!

Fuzzwork Enterprises

Twitter: @fuzzysteve on Twitter

Lutz Major
Austriae Est Imperare Orbi Universo
#3 - 2012-09-13 11:04:03 UTC
did you include the JDBC driver for the Sql Sever in the IDE?
This is a manual process somewhere in the database repository part (afaik, NetBeans has only the MySQL drivers included)
Evanova Android
Traquenard Labs
#4 - 2012-09-13 17:06:49 UTC
You need to get your hands on the MS SQL JDBC driver JAR file first.
Once you have this JAR file, add it to your project's classpath.

In your code you need to make sure the driver is loaded:
DriverManager.forName(Your driver's class name)

Then use a JDBC connection URL such as this one:
jdbc:sqlserver://[serverName[\instanceName][:portNumber]]

Example:
jdbc:sqlserver://localhost:5000 (5000 is the default port for M$ SQL Server)


So, why do you need a JDBC 'driver' in the first place ?

JDBC is a set of specifications and interfaces which implementation can only be database-vendor specific since each database has its own way to talk to the world or let the world talk to them, and handle SQL requests. So, for each vendor, you need such a 'driver' which will bridge the database to Java for you.

JDBC-ODBC is only needed when you want to connect to an ODBC data source (Windows specific, such as Access).
For MS SQL Server, you should not use that.


If you need more info or help, PM me.

Evanova
Developer of Evanova for Eve Online - The Android App!

Evanova - The Android App for Eve Online