Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Dbms prog

 
Moses Yinka
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello every body. I wrote a program with a database using netbeans when i build it on the system it works fine but when i run it on another system it seem not to recognise the database please can anyone give me tips. I used mysql dbms. Thanks
 
Vijitha Kumara
Bartender
Posts: 3914
9
Chrome Fedora Hibernate
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Moses Yinka wrote:but when i run it on another system it seem not to recognise the database please can anyone give me tips. I used mysql dbms. Thanks


Please tell us more details. What error are you getting? Any stack trace ?
 
Campbell Ritchie
Sheriff
Pie
Posts: 49789
69
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Where is the database installed on the other system? How are you invoking the database connection?
 
Moses Yinka
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Really i dont av d dbms installed on d other system. But i feel it should work. When you run a normal database appllication you dont need to first install the dbms do you.
 
Campbell Ritchie
Sheriff
Pie
Posts: 49789
69
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please avoid abbreviations like d.

Yes, you do have to install a database on a computer. No, it won't work without a database program installed.
 
Moses Yinka
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
But how do i bundle the mysql with the program so when a user installs the program the dbms is also installed
 
Paul Clapham
Sheriff
Posts: 21322
32
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well, look. If you are a beginner with databases (and it seems like you are) then it's far too soon for you to think about distributing your application. So don't ask that question yet. Instead go back and find out what your actual problem is.

Remember, you still haven't posted any details at all about your problem. So how about if you start there?
 
Moses Yinka
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Am nt new to database. I have written a database program running perfectly wel on the source machine but now i want to distribute it dat is where the problem is. So if you can help.
 
Ulf Dittmer
Rancher
Posts: 42968
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Should all clients access the same central DB, or should each have its own instance? If the former, then the DB needs to be installed on a machine that all clients can access, and the JDBC connection URL will need to contain the IP address (or machine name) of that DB server.

If, on the other hand, each client should have its own DB instance, then you could look into Java DBs that can be embedded in the client, like HSQLDB or Derby.
 
Moses Yinka
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Really the systems is not on a network. They are different systems
 
Ulf Dittmer
Rancher
Posts: 42968
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I can't tell from your reply whether there should be one central DB, or one for each client. If the clients are not all on the same network (in other words, we're talking about an internet scenario), then I'd advise against using JDBC to connect to a central DB for security reasons.

Also, as Paul said, you still haven't told us what exactly the problem is.
 
Moses Yinka
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Now guys let me repost my question. I have a program, a database(mysql) program. Now it works well on my system but when i run it on other system it gives null statement. Well maybe because the database service is not runing on the other system. Now how can i embed the database into the program so that it runs as a full standalone program ready for deployment
 
Muhammad Saifuddin
Ranch Hand
Posts: 1324
Android Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Moses Yinka wrote: Now how can i embed the database into the program so that it runs as a full standalone program ready for deployment


then use HSQLDB.

here is the article for you to start..

hope it helps.
 
Muhammad Saifuddin
Ranch Hand
Posts: 1324
Android Java Windows
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic