Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / August 2006

Tip: Looking for answers? Try searching our database.

Access do database from applet

Thread view: 
Lukasz - 03 Aug 2006 09:23 GMT
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:odbc: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.
Michael Rauscher - 03 Aug 2006 10:40 GMT
Lukasz schrieb:
> Hello,
>
[quoted text clipped - 12 lines]
> 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
fadzi ushewokunze - 03 Aug 2006 14:49 GMT
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..

> Hello,
>
[quoted text clipped - 17 lines]
> Regards,
> Lukasz.
Lukasz - 04 Aug 2006 08:47 GMT
> 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.
Michael Rauscher - 04 Aug 2006 10:23 GMT
Lukasz schrieb:
>> 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.

Then, Thomas Fritsch's solution is the one I'd prefer.

Bye
Michael
Thomas Fritsch - 03 Aug 2006 18:33 GMT
> 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/

Signature

Thomas

Lukasz - 08 Aug 2006 10:20 GMT
Thomas Fritsch napisal(a):
> > In my applet I have a method responsible for accessing the MS Access
> > database which is on my hdd.
[quoted text clipped - 8 lines]
> --
> Thomas

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
Lukasz - 08 Aug 2006 13:12 GMT
Lukasz napisal(a):
> Thomas Fritsch napisal(a):
> > > In my applet I have a method responsible for accessing the MS Access
[quoted text clipped - 23 lines]
>
> Lukasz

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

Thank you all for help.
Thomas Fritsch - 09 Aug 2006 10:53 GMT
Lukasz schrieb:
> 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.
[quoted text clipped - 3 lines]
> 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).

Signature

Thomas

Andy Dingley - 04 Aug 2006 10:44 GMT
> 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.


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.