• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Knute Snortum
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Ganesh Patekar
  • Stephan van Hulst
  • Pete Letkeman
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Ron McLeod
  • Vijitha Kumara

accessing database on server from a local machine as when required  RSS feed

 
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi !!
I am a fresher and doing a live project.The client requirement is that when he connects their site he should be given a provision to get the current database copied in a csv or a txt file on their local machine.
Please help me in this .
Thanks.
Pallavi
 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I know of 2 ways you could do this:
1.) You can write a java app that connects to a remote db
as long as it's on the network. Just put the ip address
of the server in the getConnection() method call:
Class.forName("whatever.jdbc.MyDriver");
Connection con = DriverManager.getConnection("jdbc dbc://128.0.0.1/dbname");
Send over an SQL, get the result set and format it and
save it to a file.
2.) Usually on this type of project, you need a server application that connects to the
database using a JDBC driver and some SQL. Then you need
a client app that connects to the server app using RMI, CORBA,
or whatever so you can call the methods remotely. This allows
for more than one client to connect to the server.
I'm not sure what you're looking for but hope this helps.
Keith
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!