lunenburger
Member
I am using Indusoft Version 8.1, and trying to use the VBScript button command to find a string in a column in a MySql database, and return all the values in that line.
So I have a schema called machine12, a table called recipe_list, a column called recipe_name and an Indusoft HMI string tag called RecipeName.
The operator scans in the recipe name as a string and I want to be able to lookup in the MySql table and return the recipe settings for the recipe name.
I can't figure out how to find the return the settings using a string....
I can do it using the line ID with the following script:
I think it should look like:
but of course that doesn't work...
any help would be greatly appreciated
So I have a schema called machine12, a table called recipe_list, a column called recipe_name and an Indusoft HMI string tag called RecipeName.
The operator scans in the recipe name as a string and I want to be able to lookup in the MySql table and return the recipe settings for the recipe name.
I can't figure out how to find the return the settings using a string....
I can do it using the line ID with the following script:
Code:
Dim sql, numRow, StartOffset
sql="Select * FROM machine12.`recipe_list`Where ID="&$RecipeValue&""
$numCur=$DBCursorOpenSQL("MySqlDB",sql)
numRow=$DBCursorRowCount($numCur)
$globaldata_CurrentRecipe.ID=$DBCursorGetValue($numCur," id")
I think it should look like:
Code:
Dim sql, numRow, StartOffset
sql="Select * FROM meerer12.`recipe_list`Where recipe_name="&$RecipeName&""
$numCur=$DBCursorOpenSQL("MySqlDB",sql)
numRow=$DBCursorRowCount($numCur)
but of course that doesn't work...
any help would be greatly appreciated