0
else if (sCarRental.equals("EP")) {
sStationCode = st.nextToken().trim();
sName=st.nextToken().trim();
sLocationCode = st.nextToken().trim();
sAddress1=st.nextToken().trim();
sAddress2=st.nextToken().trim();
sPostCode=st.nextToken().trim();
sCity=st.nextToken().trim();
sStationName=sName+sAddress1+sAddress2+sPostCode+sCity;
sStationType="C";
if(sLocationCode.equalsIgnoreCase("c"))
{
sStationArea="C";
}
else if (sLocationCode.equalsIgnoreCase("S"))
{
sStationArea="S";
}
else if (sLocationCode.equalsIgnoreCase("N"))
{
sStationArea="N";
}
else if (sLocationCode.equalsIgnoreCase("E"))
{
sStationArea="E";
}
else if (sLocationCode.equalsIgnoreCase("W"))
{
sStationArea="W";
}
else if (sLocationCode.equalsIgnoreCase("T"))
{
sStationArea="T";
}
else if (sLocationCode.equalsIgnoreCase("X"))
{
sStationArea="R";
}
else if (sLocationCode.equalsIgnoreCase("L"))
{
sStationArea="R";
}
else
{
sStationArea="C";
}
sSupplierCode ="EP";
sLocationCode=sStationCode.substring(0, 3);
sCrsCode = "EP";
}
我想讀一個CSV文件,並將其寫入到數據庫錯誤處理我的字符串標記
但在這裏我想添加一些錯誤處理..所以,我怎麼能做到這一點..normally我CSV文件應包含7個值,如果如果只有4個值
幫助表示讚賞..
什麼是 「ST」 嗎? – Neutralizer 2011-02-15 15:11:19
@Umair StringTokenizer我認爲。 http://download.oracle.com/javase/1.4.2/docs/api/java/util/StringTokenizer.html – 2011-02-15 15:13:58