Hi
I have many subs where this is workign but all of a sudden , this does not work. I have checked the strings are the same and still it does not pick up that there are records already in the database. If there is already the same date (String) in the database then it should do nothing. If the result is equal to 0 then it should insert...
This is from the log
Today is: 05/20/2017
05/20/2017
and the fields in the database are TEXT for the Date and Numberic for the Rate
Here is the snip of code
Thank you
I have many subs where this is workign but all of a sudden , this does not work. I have checked the strings are the same and still it does not pick up that there are records already in the database. If there is already the same date (String) in the database then it should do nothing. If the result is equal to 0 then it should insert...
This is from the log
Today is: 05/20/2017
05/20/2017
and the fields in the database are TEXT for the Date and Numberic for the Rate
Here is the snip of code
Thank you
B4X:
txtDte.Text=DateTime.Date(DateTime.Now)
Log(txtDte.Text)
If sql1.ExecQuerySingleResult("SELECT count(*) FROM xrate WHERE Date = "&txtDte.text) <> 0 Then
Else
sql1.ExecNonQuery2("INSERT INTO xrate VALUES (?,?)", Array As Object(txtDte.text, xrate)) ' add field
End If