I now have the SQL server connected to my B4A app and it runs
now to get specific data from existing tables!
I do not need to add tables just get data for now
I have added to the config.properties
sql.select_coating=SELECT type FROM coatings WHERE ID = 5
Which when from B4A I run this sub
I get the results as expected with correct answer linking ID=5 to the value under "type"
Does this mean I need to add to the config file every query ?
What I need to be able to do from variables in the B4A program is select different values instead of 5 say 1273 with out having to manually change the config.properties each time.
for a different table would I need another line in the config properties ?
This must be possible
now to get specific data from existing tables!
I do not need to add tables just get data for now
I have added to the config.properties
sql.select_coating=SELECT type FROM coatings WHERE ID = 5
Which when from B4A I run this sub
B4X:
Sub getcoat(name As String)
Log("get name - " & name)
Dim cmd As DBCommand
cmd.Initialize
cmd.Name ="select_coating"
cmd.Parameters = Array As Object(name)
reqManager.ExecuteQuery(cmd, 0, Null)
End Sub
I get the results as expected with correct answer linking ID=5 to the value under "type"
Does this mean I need to add to the config file every query ?
What I need to be able to do from variables in the B4A program is select different values instead of 5 say 1273 with out having to manually change the config.properties each time.
for a different table would I need another line in the config properties ?
This must be possible