Star-Dust Expert Licensed User Longtime User Dec 19, 2018 #1 I wrote this code that queries an online database using the resumable SUb. It works properly Code: Dim Query As String = $"SELECT * FROM ${TabellaMovimenti} WHERE (Data>='${DaDt}' AND Data<='${ADt}' AND Conto=${Conto})"$ 'Load from DB Wait For (PHP.ReadMov(Query)) Complete (Lista As List) Then I wanted to replace the variable Query with the string ... and doing so tells me error Code: 'Load from DB Wait For (PHP.ReadMov($"SELECT * FROM ${TabellaMovimenti} WHERE (Data>='${DaDt}' AND Data<='${ADt}' AND Conto=${Conto})"$)) Complete (Lista As List) Syntax error Now I put the Query variable back on, but I'm wondering why.
I wrote this code that queries an online database using the resumable SUb. It works properly Code: Dim Query As String = $"SELECT * FROM ${TabellaMovimenti} WHERE (Data>='${DaDt}' AND Data<='${ADt}' AND Conto=${Conto})"$ 'Load from DB Wait For (PHP.ReadMov(Query)) Complete (Lista As List) Then I wanted to replace the variable Query with the string ... and doing so tells me error Code: 'Load from DB Wait For (PHP.ReadMov($"SELECT * FROM ${TabellaMovimenti} WHERE (Data>='${DaDt}' AND Data<='${ADt}' AND Conto=${Conto})"$)) Complete (Lista As List) Syntax error Now I put the Query variable back on, but I'm wondering why.
JohnC Expert Licensed User Longtime User Dec 19, 2018 #2 Try removing all the "$" before and after the quotes.
LucaMs Expert Licensed User Longtime User Dec 19, 2018 #3 Star-Dust said: Then I wanted to replace the variable Query with the string Click to expand... WHY?!?!?! Your first code is better that the second one!
Star-Dust said: Then I wanted to replace the variable Query with the string Click to expand... WHY?!?!?! Your first code is better that the second one!
Star-Dust Expert Licensed User Longtime User Dec 19, 2018 #4 JohnCody said: Try removing all the "$" before and after the quotes. Click to expand... I'm using the Smart String Literal, and the syntax is $"Text"$. I tried and it does not signal an error, but I do not think it's normal
JohnCody said: Try removing all the "$" before and after the quotes. Click to expand... I'm using the Smart String Literal, and the syntax is $"Text"$. I tried and it does not signal an error, but I do not think it's normal
Erel B4X founder Staff member Licensed User Longtime User Dec 20, 2018 #5 It is a parser bug. It is fixed for v7.00.
Star-Dust Expert Licensed User Longtime User Dec 20, 2018 #6 I already use 7.00 and I have this error
Erel B4X founder Staff member Licensed User Longtime User Dec 20, 2018 #7 You are using v7.00 BETA #1. I fixed it 46 minutes ago so it was not yet released.
Star-Dust Expert Licensed User Longtime User Dec 24, 2018 #9 With B4J 7 Beta#2 The problem that small string literal did not accept was solved, but WAIT FOR does not work now. Inserting the String (Smart String Literal) in the Query variable everything works fine but if I insert the smart string literal in Wait For ... Code: Wait For (PHP.ReadQuery($"SELECT SUM(Dare) AS value_sum1, SUM(Avere) AS value_sum2 FROM ${TabellaMovimenti} WHERE (Data<'${DaDt}' AND Conto=${Conto} AND Sottoconto=${Sottoconto})"$,Array As String("value_sum1","value_sum2"))) Complete (SUM As List) The SUM List is marked in red as if there was an error, but debugging does not report an error but if I send it running everything works fine
With B4J 7 Beta#2 The problem that small string literal did not accept was solved, but WAIT FOR does not work now. Inserting the String (Smart String Literal) in the Query variable everything works fine but if I insert the smart string literal in Wait For ... Code: Wait For (PHP.ReadQuery($"SELECT SUM(Dare) AS value_sum1, SUM(Avere) AS value_sum2 FROM ${TabellaMovimenti} WHERE (Data<'${DaDt}' AND Conto=${Conto} AND Sottoconto=${Sottoconto})"$,Array As String("value_sum1","value_sum2"))) Complete (SUM As List) The SUM List is marked in red as if there was an error, but debugging does not report an error but if I send it running everything works fine
Erel B4X founder Staff member Licensed User Longtime User Dec 24, 2018 #10 Can you upload a program that demonstrates this issue?
Star-Dust Expert Licensed User Longtime User Dec 24, 2018 #11 Here you find an example where the SUM variable is marked red as if it were in error Attachments SampleError.zip SampleError.zip 1.2 KB · Views: 453
Erel B4X founder Staff member Licensed User Longtime User Dec 25, 2018 #12 Thank you, I see the red color issue. Other than that, does it work properly?
Erel B4X founder Staff member Licensed User Longtime User Dec 25, 2018 #14 Ok. It will be fixed in a future version (not 7.00).