Topic: Need Help
Anyone can mention error in following statement which is not executing and showing error on Text;
SQLExecute('INSERT INTO `Sal` (`books`)'):= form2.ComboBox2.Text;
My Visual Database → Script → Need Help
Anyone can mention error in following statement which is not executing and showing error on Text;
SQLExecute('INSERT INTO `Sal` (`books`)'):= form2.ComboBox2.Text;
SQLExecute(INSERT INTO sal (books) VALUES ("'+form2.ComboBox2.Text+'")');
Hi CDB,
This statement does not work. In fact I want to save a combobox text to another field of a table. In this statement books is a field and sal is a table. How it can be? Thanks.
Unforgettable,
Sorry I led you down the wrong path. I hadn't realised it wasn't working properly until the other day.
I've just discovered that combobox.text only works if you fill an edittbox with the combox text and then use the editbox in your SQL statement.
Make the editbox invisible.
So place the code in the ONChange event.
Form2.edit1.text := Form2.combobox1.text;
SQLExecute(INSERT INTO sal (books) VALUES ("'+form2.Edit1.Text+'")');
Thank you to reply CDB
My Visual Database → Script → Need Help
Powered by PunBB, supported by Informer Technologies, Inc.
Theme Hydrogen by Kushi