Hi everyone,
I have userexit script that is querying a MySQL database:
Part of the file that is returned (writing from memory so it can contains typos but you can get idea) :
Do Until objRS.EOF
strReturn = strReturn & objRS.Fields("job_no") & _
objRS.Fields("table1") & ("|") & _
objRS.Fields("table2") & ("|") & _
objRS.Fields("table3") & ("|") & _
objRS.Fields("table4") & ("|") & _
objRS.Fields("table5") & ("|") & _
objRS.Fields("table6") & ("|") & _
objRS.Fields("table7") & ("|") & _
objRS.MoveNext
Loop
If strReturn = "" Then
WScript.Echo "nothing returned - check if record exists in database"
Else
MySQL_JobQuery = strReturn
End If
objRS.Close
objCN.Close
I know MDT doesn't support MySQL but in our environment, we have 2x databases and I need to query both of them to pick the right image (SQL) based on details from MySQL before deployment even starts - and have to happen before any TS.
The query for MySQL works in windows PE and it returns a combined string as "table1|table2|table3.." etc and assigns it to
(customsettings.ini section)
MySqlQuery=#MySQL_JobQuery()#
My question is:
Is it possible to assign in userexit script more than one variables (not only MySqlQuery) used by MDT or do I have to write another script that split that string and then assign them like so
[variable1]
userexit=stringoperation.vbs
VariableTable1=#GetStringTable1("%MySqlQuery%)#
.
.
.
Maybe there's a better way of doing so.