I am trying to develop a inventory management system as part of my mini project.
While I try to Insert a data to my Bill_Master Database it returning an error
java.sql.SQLException: [Microsoft][ODBC driver for Oracle][Oracle]ORA-01858: a non-numeric character was found where a numeric was expected
bqty=Integer.parseInt(iqty.getText());
bamount=Float.parseFloat(famnt.getText());
bdsc=Integer.parseInt(dsc.getText());
bnet=Float.parseFloat(netamnt.getText());
billid=Integer.parseInt(billn.getText());
code=Integer.parseInt(icode.getText());
bqty=Integer.parseInt(iqty.getText());
rate=getRate(code);
iamount=rate*bqty;
amt.setText(Float.toString(iamount));
total=total+iamount;
try
{
billdetailid++;
stmt.executeUpdate("insert into Bill_Master values('"+billid+"','"+date+"','"+cname+"','"+total+"','"+bdsc+"','"+total+"','"+uid+"')");//Error Causing Line.
Values are (1,'27-oct-2013','n/a',900.00,0.0,900.00,'Desk')
Table Structure
Bill_Id (Primary Key INT ):-Stores Bill Number
Bill_Date (Date): Stores Date Of Bill
Customer_Name ( VARCHAR(50)): Customer Name
Total_amt (NUMBER(6)) :Total Bill Amount
Cash_Disc (Number(2)):Discount
Grand_Total(Number(6)):Grand Total
UID(VARCHAR(10)) Stores Who Generated the bill.(EMPLOYEE ID) Connection Type :ODBC
Please help to solve this issue.