This week's book giveaway is in the Big Data forum.
We're giving away four copies of Elasticsearch in Action and have Radu Gheorghe & Matthew Lee Hinman on-line!
See this thread for details.
The moose likes JDBC and Relational Databases and the fly likes Open an existing db to write data Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Elasticsearch in Action this week in the Big Data forum!
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "Open an existing db to write data" Watch "Open an existing db to write data" New topic
Author

Open an existing db to write data

Krithika Beri
Ranch Hand

Joined: Sep 11, 2012
Posts: 36
I want to open the existing database file and write the data into it . I am using the sqlite database.
Here is the snippet:

i am asking if you want to write the data into existing db, if there is existing db then res=1 and if it is not there res=0
Krithika Beri
Ranch Hand

Joined: Sep 11, 2012
Posts: 36
Sorry if there is existing db then res=0 if it is not there then it is 1
if i use the existing database it is saying that file is encrypted or it is not a database
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Open an existing db to write data