• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Dbms prog

 
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Bartender
Posts: 4116
72
Mac TypeScript Chrome Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ?
 
Marshal
Posts: 79151
377
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Marshal
Posts: 79151
377
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Marshal
Posts: 28177
95
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Really the systems is not on a network. They are different systems
 
Ulf Dittmer
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 1325
Android Java Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 1325
Android Java Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

another article about Using Java DB in Desktop Applications
 
reply
    Bookmark Topic Watch Topic
  • New Topic