SQL Data is read only?

Hi,
I’ve created a table in MySQL and i’m successfully reading the data on a window. I have made the columns editable, yet when I change the data, the old data pops right back in.

I bet it is something nice and easy that I’m missing…but…I can’t find it :slight_smile:

Thanks in advance!

Ed

I think I posted toooo early :slight_smile:

I am able to read and write data…now looking to figure out how to add a new SQL record…

any ideas?

Thank you all mighty Ignition gods.

-e-

So you already have a script on the cellEdited event of the table that runs an UPDATE query to the database. Now you can create a button on the screen that runs an INSERT query inserting a new row with default values. You can also pop up a add window that allows the user to fill in some input fields that you use in the INSERT query.

Can I set up a read only chart for a SQL table without device tie in? Basically can I grab SQL without connecting a PLC and make a chart? If this is the wrong forum, please advise.

Thanks Team.
:prayer:

Yes you can graph data that comes from an SQL database. Check out the Chart component. The typical way of populating it is binding the Data property to an SQL query. You probably want to turn polling off so it only runs the query once when you open the window.

As an aside, please post new topics as new threads. That makes it easier for people searching the forum later to understand what is going on.