K Kiran Raotole Active Member Licensed User Aug 9, 2018 #1 After inserting numeric value in database and the value is round I have a php code and get value = 152448.52 my b4a code is B4X: amt = m.Get("mamt") sql.ExecNonQuery2("INSERT INTO gl " & _ "(fbook,faccode,fdesc,fplace,fitcu,fin1,ftype," & _ "famt,fq1,fq2,fq3,frate1,frate2,frate3,fgst1,fvat2,fnum1,fnum2,fnum3,fnum4,fnum5) VALUES " & _ "(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)", _ Array As String(book,accode,desc,place,itcu,in1,ftype, _ amt,q1,q2,q3,rate1,rate2,rate3,gst1,vat2,num1,num2,num3,num4,num5)) Log : Log("JSON === " & amt) := JSON === 152448.52 Log(tr.ExecQuerySingleResult("select famt from gl where fbook='G001' and faccode='MAI1'")) :=152449
After inserting numeric value in database and the value is round I have a php code and get value = 152448.52 my b4a code is B4X: amt = m.Get("mamt") sql.ExecNonQuery2("INSERT INTO gl " & _ "(fbook,faccode,fdesc,fplace,fitcu,fin1,ftype," & _ "famt,fq1,fq2,fq3,frate1,frate2,frate3,fgst1,fvat2,fnum1,fnum2,fnum3,fnum4,fnum5) VALUES " & _ "(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)", _ Array As String(book,accode,desc,place,itcu,in1,ftype, _ amt,q1,q2,q3,rate1,rate2,rate3,gst1,vat2,num1,num2,num3,num4,num5)) Log : Log("JSON === " & amt) := JSON === 152448.52 Log(tr.ExecQuerySingleResult("select famt from gl where fbook='G001' and faccode='MAI1'")) :=152449
Erel B4X founder Staff member Licensed User Longtime User Aug 9, 2018 #2 Tip: Use the smart string literal: B4X: sql.ExecNonQuery2($"INSERT INTO gl (fbook,faccode,fdesc,fplace,fitcu,fin1,ftype, famt,fq1,fq2,fq3,frate1,frate2,frate3,fgst1,fvat2,fnum1,fnum2,fnum3,fnum4,fnum5) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)"$, _ What is the column type of the relevant field? Upvote 0
Tip: Use the smart string literal: B4X: sql.ExecNonQuery2($"INSERT INTO gl (fbook,faccode,fdesc,fplace,fitcu,fin1,ftype, famt,fq1,fq2,fq3,frate1,frate2,frate3,fgst1,fvat2,fnum1,fnum2,fnum3,fnum4,fnum5) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)"$, _ What is the column type of the relevant field?
K Kiran Raotole Active Member Licensed User Aug 10, 2018 #3 Erel said: Tip: Use the smart string literal: B4X: sql.ExecNonQuery2($"INSERT INTO gl (fbook,faccode,fdesc,fplace,fitcu,fin1,ftype, famt,fq1,fq2,fq3,frate1,frate2,frate3,fgst1,fvat2,fnum1,fnum2,fnum3,fnum4,fnum5) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)"$, _ What is the column type of the relevant field? Click to expand... famt is deciaml(15,2) Upvote 0
Erel said: Tip: Use the smart string literal: B4X: sql.ExecNonQuery2($"INSERT INTO gl (fbook,faccode,fdesc,fplace,fitcu,fin1,ftype, famt,fq1,fq2,fq3,frate1,frate2,frate3,fgst1,fvat2,fnum1,fnum2,fnum3,fnum4,fnum5) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)"$, _ What is the column type of the relevant field? Click to expand... famt is deciaml(15,2)
Erel B4X founder Staff member Licensed User Longtime User Aug 12, 2018 #4 1.I'm asking about the SQLite database. 2. What is the value of: B4X: Log(amt) ? Upvote 0
Erel B4X founder Staff member Licensed User Longtime User Aug 15, 2018 #6 So the problem is with the code that fetches the data from the remote database. I recommend you to switch to jRDC2. It will be simpler, perform better and more secure. Upvote 0
So the problem is with the code that fetches the data from the remote database. I recommend you to switch to jRDC2. It will be simpler, perform better and more secure.