Figure 8    Converting Questions into SQL


Set objEQSession = Server.CreateObject("Mseq.Session")
objEQSession.InitDomain(Application("DomainFile"))
Set objEQResponse = objEQSession.ParseRequest(strQuest)

Select Case objEQResponse.Type
Case nlCommandResponse
    Set objCommands = objEQResponse.Commands
    For intCommand = 0 To objCommands.Count - 1
        Set objCommand = objCommands(intCommand)
        Select Case objCommand.CmdID
        Case nlQueryCmd
            DoSQLCommand objCommand
        Case nlAnswerCmd
            Response.Write objCommand.Answer
    Next
Case nlUserClarifyResponse
    DoClarification objEQResponse, strQuestion
Case nlErrorResponse
    Response.Write objEQResponse.Description & "<BR>"
    Response.End
End Select