Follow @dporton

JustCode : Update a sample record

This code shows you how to update a sample record from an MRS script.

Dim oConnection

' Start code to check if the field has data in it.
    Set oConnection = CreateObject("ADODB.Connection")

' Standard Connection String You need to change this
    oConnection.ConnectionString = "Provider=SQLOLEDB.1;Password=MyPassword;Persist Security Info=-1;User ID=MyUser;Initial Catalog=Participants;Data Source=MyServer"

    If ( oConnection.State = 1 ) Then
        oConnection.Execute("UPDATE TABLE1 SET Queue = 'Fresh' WHERE Queue = 'Completed'")
    End If


Set oConnection = Null

Just Code : Run MRS from an MRS

This shows us how we can run an MRS from within an MRS file.

Dim oScriptEngine, sScript, oProgram, sResult

' Define the test script
sScript = "Dim x, y, result" + mr.CrLf + _
"x = ""Hello """ + mr.CrLf + _
"y = ""World""" + mr.CrLf + _
"result = x + y"

' Create the script engine and parse
Set oScriptEngine = CreateObject("mrScript.ScriptEngine")

Set oProgram = oScriptEngine.Parsers[0].Parse(sScript, oScriptEngine, 0)

' Execute the script
oScriptEngine.Execute(oProgram, 0)

' Get the result variable value
sResult = oProgram.Variables["result"]  

2×4 Data Collection Interviewer Server Backup Application

I have been on holiday for the last few weeks and during that time I managed to get some articles written. Whilst on holiday I was asked by 2×4 if I wanted to have a play with their backup tool and of course I excepted. This article is about that app and it shows you what it can do and how you can do it in the first release. To be honest , and I get nothing for saying this , I think this will turn into a “Must Have App” for all those users out there , and I know a few , that struggle with or do not even do backups. With a couple of clicks you have backed up a project or restored it. No Complicate procedures , just a few clicks and you are done. Anyway , here is what I did and the screen shots that go with it.

Read more2×4 Data Collection Interviewer Server Backup Application

Parameterised Batch Files & Scripts

Did you know that you can write dos batch files to execute your mrs and dms scripts , Ace asked us the other day how he could sucessfully parameterise these scripts to make them generic and easy to use for multiple projects. In this post we will show you how this can be done.

Read moreParameterised Batch Files & Scripts

Printing respondent answers from a Data Management Script

It’s been a while since our last article on printing to word, but we thought that we should continue as we have completed some more work on this. In this article you will see how to take the code that has already been written and use it inside of a DMS script to produce a word document for every record.

Read morePrinting respondent answers from a Data Management Script

What Hardware Part 5 : Complex Cluster Install

Now that we have seen a basic cluster setup , we should expand on it and show you how you can make your cluster as tolerant as possible. This article will talk about splitting out the tiers to different machines and highlight the advantages of doing this.

Read moreWhat Hardware Part 5 : Complex Cluster Install

%d bloggers like this: