File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JDBC and the fly likes initialize database from properties file Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "initialize database from properties file" Watch "initialize database from properties file" New topic
Author

initialize database from properties file

James Hewitt
Greenhorn

Joined: Jul 09, 2001
Posts: 27
I am having problems writing a servlet to populate a database with values taken from a properties file (a simple text file). I have no problems when the properties file looks like this:
x=1
y=2
I can simple use String x = properties.getString("x"); and then enter x into an sql query. However, I need to populate the database from a property file which looks like this:
1 5
2 4
3 3
4 2
5 1
That is, the left column represents a series of values of "x" and the right column a series of values of "y". How do I get these values into my servlet and enter them en masse into a database?
Thanks in advance,
James
rani bedi
Ranch Hand

Joined: Feb 06, 2001
Posts: 358
Explore the java.io package. http://java.sun.com/j2se/1.3/docs/api/index.html


Cheers,<br />Rani<br />SCJP, SCWCD, SCBCD
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: initialize database from properties file
 
Similar Threads
Nested Loops
Java loops- linear/log time- calculation
Sorting in JavaScript
the world's smallest number?
Nested Loop