hi all
here im trying to create .csv file.
my code is
public class CSVFile {
public static void main(String[] args) {
String record=null;
try {
Class.forName(" org.sqlite.JDBC ");
Connection conn=DriverMana ger.getConnecti on("jdbc:sqlite :"+"C:\\Sqlite\ \retriver.db");
Statement stmt = conn.createStat ement(); ResultSet rs = stmt.executeQue ry("select * from fileSystem");
ResultSetMetaDa ta meta=rs.getMeta Data();
int colCount=meta.g etColumnCount() ;
int j=0;
File fileStore = new File(fileStore. csv");
FileOutputStrea m fos=new FileOutputStrea m(fileStore);
long i=0;
while(rs.next() )
{
record=rs.getSt ring(1)+","rs.g etString(2)","r s.getString(3)" ,"rs.getString( 4)","rs.getStri ng(5)","rs.getS tring(6)","rs.g etString(7)","r s.getString(8)" ,"rs.getString( 9)"\n";
fos.write(recor d.getBytes());
System.out.prin tln("counter"+( j++));
}
This is my code
my problem is in my database i have 2,00,000 records
but here i will get upto 65,000 records only
i want to get all records
is there any solution
here im trying to create .csv file.
my code is
public class CSVFile {
public static void main(String[] args) {
String record=null;
try {
Class.forName(" org.sqlite.JDBC ");
Connection conn=DriverMana ger.getConnecti on("jdbc:sqlite :"+"C:\\Sqlite\ \retriver.db");
Statement stmt = conn.createStat ement(); ResultSet rs = stmt.executeQue ry("select * from fileSystem");
ResultSetMetaDa ta meta=rs.getMeta Data();
int colCount=meta.g etColumnCount() ;
int j=0;
File fileStore = new File(fileStore. csv");
FileOutputStrea m fos=new FileOutputStrea m(fileStore);
long i=0;
while(rs.next() )
{
record=rs.getSt ring(1)+","rs.g etString(2)","r s.getString(3)" ,"rs.getString( 4)","rs.getStri ng(5)","rs.getS tring(6)","rs.g etString(7)","r s.getString(8)" ,"rs.getString( 9)"\n";
fos.write(recor d.getBytes());
System.out.prin tln("counter"+( j++));
}
This is my code
my problem is in my database i have 2,00,000 records
but here i will get upto 65,000 records only
i want to get all records
is there any solution
Comment