0

I'm new in working with databases and connecting java to sql server. I just created a database and a java application for it. I used the sqljdbc4.jar file in my library and all the stuff required to connect the app with the database, but I want to know : what do I need to export so someone in an other computer can use that application and have that database in that computer, without having installed sql server or something, what do I need to do ?

1
  • the java aplication only make a conection with a database, but you can export the info that you have in your computer, only if you make with io a file with the info and then you insert in the new computer or even if if you are doing a remote conexion its no necesary Commented Oct 11, 2014 at 23:03

1 Answer 1

1

It depends on what you want to do. If you want them to connect to a databse via your app, then you will have to allow them to access the database via your application by providing the privileges. If you want to bundle the whole database with your java code, then you need to use an in application database like h2 http://www.h2database.com/html/main.html. There are alternatives like derby and hsql db, but h2 is better than that. See the comparison on the h2 homepage.

Sign up to request clarification or add additional context in comments.

2 Comments

Okay I think the second one is that what I want to do : I want that application to have its database that I have made on SQL Server, and if I move that app in other computers, they will have then that database in their computer, and all the changes and stuff that they do will be saved in their computer.
@gencblakqori - SQL server is too big too move. SQL server compact perhaps ?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.