on mouseUpĮnd if - edit these variables to match your database & table - this assumes a table called Table1 with 3 fields put "Table1" into tTableName Make a new button as before, call it "Add Record" and copy in the script below. In this case, the LiveCode command is revExecuteSQL. This uses a similar technique to the one used for querying the data: construct an SQL command to add the new data and then use a LiveCode command to send this SQL to the database and get a response. I have put a couple of sample entries into the database, so you should see some information appear in the "Data" field. check the result and display the data or an error message if item 1 of tData = "revdberr" then answer error "There was a problem querying the database:" & cr & tDataĬompile the script and test the Query button. query the database put revDataFromQuery(tab, cr, gConnectionID, tSQL) into tData If gConnectionID is not a number then answer error "Please connect to the database first."Įnd if - construct the SQL (this selects all the data from the specified table) put "Table1" into tTableName - set this to the name of a table in your database put "SELECT * FROM " & tTableName into tSQL check the global connection ID to make sure we have a database connection global gConnectionID The names of the buttons are not so important, but the script is going to refer to field "Data", so make sure it is named.Ĭopy the script below and use it to set the script of the "Query" button. Now drag over a scrolling text field and call it "Data". To get data from the database, construct a standard SQL query, then use the revDataFromQuery() function to retrieve the matching data.ĭrag another button from the Tools palette, and use the Inspector to change it's name to "Query". Note: if you test the button with incorrect settings, it may take a long time to fail, so don't panic if it looks like everything is frozen. If it gives an error check the script, especially the four variables that hold the connection information. It should connect to the sample database on and tell you when it has succeeded. Save the script by clicking "Compile" in the Script Editor, then click the "Connect" button to test. check if it worked and display an error message if it didn't - & set the connection ID global if tResult is a number then put tResult into gConnectionIDĪnswer info "Connected to the database." & cr & "Connection ID = " & gConnectionIDĪnswer error "Unable to connect to the database:" & cr & tResult connect to the database put revOpenDatabase("MySQL", tDatabaseAddress, tDatabaseName, tDatabaseUser, tDatabasePassword) into tResult set up the connection parameters - edit these to suit your database put "" into tDatabaseAddress use a global variable to hold the connection ID so other scripts can use it global gConnectionID use the Inspector to change the button's name to "Connect" and copy the script below into its script. Our top choices for the IT Management Software category are: Cloudflare,, Norton Security.Create a new stack and drag over a new button from the Tools palette. We realize that not all companies have enough time to try out a wide range of various products, so we created a list of recommendations that you may find useful. remember to consider your company’s or industry’s special circumstances, such as, a multilingual software for a global company or a mobile app to help you work in the field. We suggest that you spend some time to review their differences and decide which one is the better option for your business. Or you can check their general user satisfaction rating, 100% for ManageEngine ADAudit Plus vs. Here it's also possible to match their total scores: 8.6 for ManageEngine ADAudit Plus vs. What is better ManageEngine ADAudit Plus or Valentina Studio Pro? Getting the proper IT Management Software product is as straightforward as comparing the good and weaker functionalities and terms offered by ManageEngine ADAudit Plus and Valentina Studio Pro.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |