I have Vbscript that modifies an existing record in a table in MSSQL:
Command.CommandText = "UPDATE Tabela_san SET Tabela_san.ilosc_na_roli = '" & ilosc_na_roli_form_id & "' WHERE Tabela_san.ID = '" & ID_variable & "'"
The second script to an existing record in the MSSQL database adds only a character in the form of a value but does not increment it or sum it:
Command.CommandText = "update Tabela_san set Tabela_san.ilosc_na_roli = Tabela_san.ilosc_na_roli + '" & ilosc_na_roli_form_id & "' WHERE Tabela_san.ID = '" & ID_variable & "'"
The third script adds a value of 5 to the selected record and increases it by 5:
Command.CommandText = "update Tabela_san set Tabela_san.ilosc_na_roli = Tabela_san.ilosc_na_roli + 5 WHERE Tabela_san.ID = '" & ID_variable & "'"
I would like the script to populate a number (quantity) of the ilosc_na_roli_form_id and call it with a script button added to the MSSQL database a value from the field ilosc_na_roli_form_id to the value contained in the MSSQL database summing it.
To work as a third script, but instead of constant 5, you could use the variable ilosc_na_roli_form_id (edit field) to sum the values contained in the database.
So for example:
5 + 2 = 7