Link to home
Start Free TrialLog in
Avatar of davidlars99
davidlars99Flag for United States of America

asked on

English Query Problem is Driving me Nuts...

it doesn't show me any error messages, connection is right all rights are assign read/write/script access to the virtual directory and still it's not working, if you have ever done this in ASP please save me  :)


<HTML>
<HEAD>
</HEAD>
<BODY>

<form name="f1" action="northwind.asp" method="post">
<input type="text" name="txt1" value="">
<br><br>
<input type="submit" name="sbmt" value="Search...">
</form>

<%

if request.servervariables("content_length")>0 then
   Dim go, eqr, eqs
   set eqs=server.createobject("Mseq.Session")
   eqs.InitDomain("C:\Northwind\Northwind.eqd")
   
   set cn=server.createobject("ADODB.Connection")
   set rs=server.createobject("ADODB.Recordset")
   cn.open "Driver=SQL Server;SERVER=(local);UID=sa;PWD=xxxxxx;DATABASE=Northwind"
   
   set rs.ActiveConnection=cn
   rs.CursorType=adOpenStatic
   
   set eqr=eqs.ParseRequest(request("txt1"))

   do until go=false
      select case eqr.type
     
         case nlResponseCommand
            if eqr.commands(0).CmdID=nlCmdQuery then
               response.write(eqr.Restatment)
               rs.Open eqr.commands(0).SQL
               response.write(0)
               cmdExecute.Enabled=False
            elseif eqr.commands(0).CmdID=nlCmdAnswer then
               response.write(eqr.commands(0).Answer)
            end if
            go=True
           
         case nlResponseError
            go=True
         case nlResponseUserClarify
            go=False
      end select
   loop
end if

%>  
   
</BODY>
</HTML>
ASKER CERTIFIED SOLUTION
Avatar of frugle
frugle

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of davidlars99

ASKER

ohh... sorry, after testing several times I forgot to post the original one "do until go=true" and it's set to "true" before loop

thanks for taking look..
Avatar of frugle
frugle

damn these vulcan ears!
this must be some kind of slang which I really want to understand  "vulcan ears!"
"vulcan ears" - used for finding logic errors.

see http://nawtythings.com/halloween/ears/e2.jpg but don't go to the main site, it's got a bit of adult content :P

Mike
well, at least you corrected one error...  :)