aspose file tools*
The moose likes JDBC and the fly likes Dbms prog Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Dbms prog" Watch "Dbms prog" New topic
Author

Dbms prog

Moses Yinka
Greenhorn

Joined: Jul 16, 2009
Posts: 7
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

Joined: Mar 24, 2008
Posts: 3829

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 ?


SCJP 5 | SCWCD 5
[How to ask questions] [Twitter]
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 38765
    
  23
Where is the database installed on the other system? How are you invoking the database connection?
Moses Yinka
Greenhorn

Joined: Jul 16, 2009
Posts: 7
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

Joined: Oct 13, 2005
Posts: 38765
    
  23
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

Joined: Jul 16, 2009
Posts: 7
But how do i bundle the mysql with the program so when a user installs the program the dbms is also installed
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18564
    
    8

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

Joined: Jul 16, 2009
Posts: 7
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
Marshal

Joined: Mar 22, 2005
Posts: 41812
    
  62
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.


Ping & DNS - my free Android networking tools app
Moses Yinka
Greenhorn

Joined: Jul 16, 2009
Posts: 7
Really the systems is not on a network. They are different systems
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41812
    
  62
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

Joined: Jul 16, 2009
Posts: 7
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

Joined: Dec 06, 2005
Posts: 1321

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.


Saifuddin..
[Blog][Linkedin] How To Ask Questions On JavaRanch My OpenSource
Muhammad Saifuddin
Ranch Hand

Joined: Dec 06, 2005
Posts: 1321


another article about Using Java DB in Desktop Applications
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Dbms prog