hi! i just bought the csv driver.
however it incorrectly separate the field data in the sample below:
"KP","KODSEK","NAMA","TLAHIR","ALAMAT","ALAMAT2","POSKOD","BANDAR","NEGERI","TELEFON","NAMAWARIS","KPWARIS","DARJAH","NKELAS","JANTINA","KAUM","WARGA","NEGASAL","AGAMA","PBAPA","PIBU","PJAGA","JUMLAH","KBAPA","KIBU","KJAGA","JARAK","BILAHLI","BILBELAJAR","YATIM","STATUSJAGA","BILSPBT","BILRMT","BILASRAMA","PEKAN","SAR","CATATAN","KEMASKINI","PERKAPITA","P1","P2","UPSR","PMR","SPM","SPBT","RMT","PSS","BIASISWA","JENISBIA","TUISYEN","KWAPM1","KWAPM2","KWAPM3","KWAPM4","OKU","TGASRAMA","ASRAMA","UNI","JUNI","KEL","JKEL","SUK","JSUK","KHIDMAT1","KHIDMAT2"
"880920045171","MRA2125","AHMAD MUKHSIN BIN ZAZAM",20/09/1988 0:00:00,"KM 15.5 KG. SERI MINYAK, UMBAI, 77300 MERLIMAU, MELAKA",,"77300","MERLIMAU","04","0176642692","ZAZAM BIN AHMAD","500815045439","T6R","SYARIAH","L","01","W",,"01",3000.00,0.00,0.00,3000.00,"P56","X01","X00",15,9,4,"T","J1",3,0,0,,"T",,08/04/2007 0:00:00,333.33,0.00,0.00,"2A","6A","2A","T","T","T","T","B0","T","T","T","T","T","T","T","A0","A05","AB","B01","AB","F05","AB","P99","P00"
"890110035130","MRA2125","SITI RAWAIDA BTE ROSLI",10/01/1989 0:00:00,"NO. 27, JLN. PANDAN JAYA, TMN. PANDAN JAYA",,"75250","MELAKA","04","0176060534","ROSLI BIN MANSOR","RF72276","T6R","SYARIAH","P","01","W",,"01",2075.85,0.00,0.00,2075.85,"P59","X01","X00",7,7,4,"T","J1",3,0,0,,"T",,08/05/2007 0:00:00,296.55,0.00,0.00,"3A","4A","3A","T","T","T","T","B0","T","T","T","T","T","T","T","A0","A04","BN","B99","AJ","F01","AB","P03","P12"
"890215045132","MRA2125","ROSHAZMI BT. MOHAMED RASIP",15/02/1989 0:00:00,"NO. 18, JLN DESA MOLEK 12, TAMAN DESA MOLEK",,"75460","MELAKA","04","0062680143","MOHAMED RASIP B. SAMAT","470310015707","T6R","SYARIAH","P","01","W",,"01",450.55,0.00,0.00,450.55,"P56","X01","X00",24,7,1,"T","J3",0,0,1,,"T",,07/03/2007 0:00:00,64.36,0.00,0.00,"3A","5A","3A","T","T","T","T","B0","T","T","T","T","T","T","Y","A2","A99","AB","B99","AB","F05","AB","P99","P00"
"890217045304","MRA2125","NURLIYANA BT ASMANI",17/02/1989 0:00:00,"NO. 3, JLN. BERTAM PERDANA 4, TAMAN PERTAM PERDANA,",,"75200","PULAU GADONG","04","0176722057","ASMANI BIN SENIN","RF102451","T6R","SYARIAH","P","01","W",,"01",1598.71,0.00,0.00,1598.71,"P59","X01","X00",15,6,4,"T","J1",3,0,1,,"T",,07/08/2007 0:00:00,266.45,0.00,0.00,"3A","4A","2A","T","T","T","T","B0","T","T","T","T","T","T","Y","A2","A04","AB","B01","AB","F01","AB","P99","P99"
"890313305006","MRA2125","NORHAFIZAH BTE JAAFAR",13/03/1989 0:00:00,"KM 16, SOLOK SEROMPONG, KG. TEHEL",,"77200","BEMBAN","04","0195768236","JAAFAR BIN HAMZAH","441028045205","T6R","SYARIAH","P","01","W",,"01",599.70,0.00,0.00,599.70,"P56","X01","X00",28,11,5,"T","J1",2,0,0,,"T",,08/04/2007 0:00:00,54.51,0.00,0.00,"4A","-","2A","T","T","T","T","B0","T","T","T","T","T","T","T","A0","A05","AB","B01","AB","F01","AB","P99","P00"
where the first row is the field/column names in the csv file
i hav set the properties as below
properties.put("_CSV_Header","true");
properties.put("_CSV_Separator",",");
properties.put("_CSV_Quoter","\"");
con1 = DriverManager.getConnection("jdbc:csv://///TEST.TXT, properties);
could u help on this
for yr info ms excel csv import, sql server csv import managed to get it right.
2ndly,
i tried to use rs.getString("KP")... error 'column not found!' comes out.
thanks
remy
|