Noob-Botier 1 Posted March 23, 2013 Report Share Posted March 23, 2013 Im finding that if I have a data mismatch, or something, strange that causes my insert statement to fail, I get no indication of the failure to execute the command. Can someone help me understand ways to recognize if my sql command works or not. Obviously I can tell if a select works by whether I get data or not... I tried using a "set" node for a new variable, and putting my sql command in the new value field, but the node wont accept the sql command. I was thinking I could get a -1 for a failed insert, or something of the like. Whether or not I have a data issue, I would like to get a confirmation that an insert worked in the future. Thanks. -Chris Quote Link to post Share on other sites
AutomationNinja 194 Posted March 25, 2013 Report Share Posted March 25, 2013 Here ya go: http://www.ubotstudio.com/forum/index.php?/topic/12030-tutorial-example-codes-how-to-use-mysql-with-ubot-studio/?hl=%2Bdatabase+%2Bcommand Just follow the steps. You already have the answer to your question "Obviously I can tell if a select works by whether I get data or not..." Quote Link to post Share on other sites
Noob-Botier 1 Posted March 25, 2013 Author Report Share Posted March 25, 2013 Thanks AutomationNija: Yes, Im not looking to confirm the select statement, its the insert. I guess I can run a select statement right after the insert to see if what I had hoped was in there, would be in there, but I was running into the scenario where the data Im inserting into a mysql table isnt unique to that table.... if it is a duplicate record, possibly a few times over, how do I know which one I inserted, in order to confirm it went in there? I guess, one option is to tag a date and time to the insert, then query to see if that record with the date and time made it in or not. Any other suggestions? Thanks, Noob Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.