This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes JDBC and the fly likes Insert into database with Java Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Insert into database with Java " Watch "Insert into database with Java " New topic
Author

Insert into database with Java

Cloey Tan
Ranch Hand

Joined: Feb 03, 2009
Posts: 60
As part of eliminating the need to run the sql scripts manually in order to update existing database, im going to develop a system which can take the scripts from certain classes, and run the scripts from there, sometimes the amount of sql scripts may get huge, and im concerning the performace regarding this action. So i need some consultation, help, guidelines from javaranch forum here before i start off with this. What are some of the major things that need to be taken into consideration when it comes to this? And if halfway running the script certain issues occur, what measures have to take. Your help is very much appreciated!
Scott Selikoff
Saloon Keeper

Joined: Oct 23, 2005
Posts: 3703
    
    5

Why not write something in JDBC that solves the problem? Writing a program that auto-loads scripts doesn't really eliminate the need for them. You can just have a cron job doing that. To answer your question though, MySQL has some special formats it accepts for bulk loading a file. Please go into more detail about what you are concerned about.


My Blog: Down Home Country Coding with Scott Selikoff
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Insert into database with Java
 
Similar Threads
running sql scripts
Execute .sql file using java
Execute SQL Scripts with Java
Run Nightly Tasks
SQL scripts for data migration