I am trying to optimize the Nicelabel solution we have built last year.
At the moment we run a bunch of select queries, which select only one database field and we put the result in a variable.
What I want to do to optimize this is run 1 query where I select the fields I need, and assign the fields to a variable and go from there.
My best guess was to write a script which would accomplish this. This is my script:
Code: Select all
' Connection String required to connect to MS Access database connectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=U:\My Documents\db1.mdb;" ' SQL statement to run sql = "select * from Adressenlijst where id='1'" ' Create ADO Connection/Command objects set cn = createobject("ADODB.Connection") set cmd = createobject("ADODB.Command") set rs=Createobject("ADODB.recordset") ' Open connection cn.open connectionString '3 is adOpenStatic rs.open sql,cn,3 if NOT rs.EOF then [strachternaam]=rs("Achternaam") [strvoornaam]=rs("Voornaam") [strfunctie]=rs("Functie") [strorganisatie]=rs("Organisatie") end if
In this topic Saso from the nicelabel team talks about using the Structured text filter and use that method.
Now I am wondering what the best solution would be. Can I keep using the ADODB method to retrieve the data or is it better to use the structured text filter?
Where can I find this structured text filter in Nicelabel 2017?
At the moment I am pulling data from a Microsoft Access database, but I am planning to migrate this to MSSQL server.
Thank you in advance.