Access do database from applet

L

Lukasz

Hello,

In my applet I have a method responsible for accessing the MS Access
database which is on my hdd.

Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
String filename = "C:\\Documents and
Settings\\lukasz\\Desktop\\Licenses2.mdb";
String database = "jdbc:eek:dbc:Driver={Microsoft Access Driver
(*.mdb)};DBQ=";
database+= filename.trim() + ";DriverID=22;READONLY=True}";
Connection con = DriverManager.getConnection( database ,"","");

Now I would like to put it on a server, with an IP example 192.168.15.1
and have access to this database from every pc around the world :)
What I need to add to this method to make it possible?

Thanks for any reply.

Regards,
Lukasz.
 
M

Michael Rauscher

Lukasz said:
Hello,

In my applet I have a method responsible for accessing the MS Access
database which is on my hdd.

Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
String filename = "C:\\Documents and
Settings\\lukasz\\Desktop\\Licenses2.mdb";
String database = "jdbc:eek:dbc:Driver={Microsoft Access Driver
(*.mdb)};DBQ=";
database+= filename.trim() + ";DriverID=22;READONLY=True}";
Connection con = DriverManager.getConnection( database ,"","");

Now I would like to put it on a server, with an IP example 192.168.15.1
and have access to this database from every pc around the world :)
What I need to add to this method to make it possible?

With respect to Access, there will be an answer: let it be.

You would have to create a share on your server, let's call it database.
Probably you would need a public ip address (don't know if windows can
handle internet domain names in UNC paths), let's denote it by
xxx.xxx.xxx.xxx. Then you would have to change filename:

String filename = "\\xxx.xxx.xxx.xxx\database\Licences2.mdb"

Of course, your routers/firewalls must be configured so that windows
network is reachable from the world.

Hm, if I didn't forget anything, at last you would just have to make
sure, only clients which can use UNC names and have the Access driver
installed will view your applet.

Bye
Michael
 
F

fadzi ushewokunze

Why are you using Access and applets?
Better approach is serlvets and something like MySql or PostGres if you
are designing for a multi user environment.

with these databases you can use an IP address etc to locate the
database. You have to remember Access is a "desktop application" not a
RDBMS. I am not a fan of either Access nor applets.

Let me know if you want more info..
 
T

Thomas Fritsch

Lukasz said:
In my applet I have a method responsible for accessing the MS Access
database which is on my hdd. [...]
Now I would like to put it on a server, with an IP example 192.168.15.1
and have access to this database from every pc around the world :)
What I need to add to this method to make it possible?
If you really want to stick to MS Access (instead of using a
network-capable DBMS), then this can be a solution:
http://rmijdbc.objectweb.org/
 
L

Lukasz

Why are you using Access and applets?
Better approach is serlvets and something like MySql or PostGres if you
are designing for a multi user environment.

I'm using it, beceuse I have to, not because I want. All the database
in MS Access is ready, as also applet.
 
M

Michael Rauscher

Lukasz said:
I'm using it, beceuse I have to, not because I want. All the database
in MS Access is ready, as also applet.
Then, Thomas Fritsch's solution is the one I'd prefer.

Bye
Michael
 
A

Andy Dingley

Lukasz said:
Now I would like to put it on a server, with an IP example 192.168.15.1
and have access to this database from every pc around the world :)
What I need to add to this method to make it possible?

MySQL. It's easier to port the database than it is to manage
connectivity to Access, especially if you're web-hosting with non-M$
tools.
 
L

Lukasz

Thomas Fritsch napisal(a):
Lukasz said:
In my applet I have a method responsible for accessing the MS Access
database which is on my hdd. [...]
Now I would like to put it on a server, with an IP example 192.168.15.1
and have access to this database from every pc around the world :)
What I need to add to this method to make it possible?
If you really want to stick to MS Access (instead of using a
network-capable DBMS), then this can be a solution:
http://rmijdbc.objectweb.org/

Thanks for help Thomas, I tried rmijdbc and it works fine on my pc. Now
I wan to put the *.mdb on a server, thus I have some more questions.

On my pc I had to add System DSN, to have local as also remote (from my
pc to my pc) access to database. Without specyfying the System DSN,
both methods - local and remote fail. So, do I have to add System DSN
on a server side?

To run a remot client on my pc I had to run RJJdbcServer. When I put
the database on a server, on which side I need to run RJJdbcServer?
Only client side, server side or both?

Lukasz
 
L

Lukasz

Lukasz napisal(a):
Thomas Fritsch napisal(a):
Lukasz said:
In my applet I have a method responsible for accessing the MS Access
database which is on my hdd. [...]
Now I would like to put it on a server, with an IP example 192.168.15.1
and have access to this database from every pc around the world :)
What I need to add to this method to make it possible?
If you really want to stick to MS Access (instead of using a
network-capable DBMS), then this can be a solution:
http://rmijdbc.objectweb.org/

Thanks for help Thomas, I tried rmijdbc and it works fine on my pc. Now
I wan to put the *.mdb on a server, thus I have some more questions.

On my pc I had to add System DSN, to have local as also remote (from my
pc to my pc) access to database. Without specyfying the System DSN,
both methods - local and remote fail. So, do I have to add System DSN
on a server side?

To run a remot client on my pc I had to run RJJdbcServer. When I put
the database on a server, on which side I need to run RJJdbcServer?
Only client side, server side or both?

Lukasz

My previous answer is no longer actual. I did some experiments, and now
everything works OK.

Thank you all for help.
 
T

Thomas Fritsch

Lukasz said:
Thanks for help Thomas, I tried rmijdbc and it works fine on my pc. Now
I wan to put the *.mdb on a server, thus I have some more questions.

On my pc I had to add System DSN, to have local as also remote (from my
pc to my pc) access to database. Without specyfying the System DSN,
both methods - local and remote fail. So, do I have to add System DSN
on a server side? Yes.

To run a remot client on my pc I had to run RJJdbcServer. When I put
the database on a server, on which side I need to run RJJdbcServer?
Only client side, server side or both?
On server side only (where the DSN and *.mdb is).
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,902
Latest member
Elena68X5

Latest Threads

Top