2 Replies Latest reply: Nov 20, 2012 9:16 AM by Kabilan Kumarasamy RSS

    What is the syntax?

    Kabilan Kumarasamy

      Hi All,

       

      I have a issue.

       

      I have written the vb script like below

       

      strHospitalQry = "Select * from HospitalRooms_Chunk"

      set rstAuthors = cn.execute(strHospitalQry)

      rstAuthors.MoveFirst

      Do Until rstAuthors.EOF

       

       

      Dim vPatientName

      Dim vID

      Dim vRoom

      Dim vCheckIn

      Dim vAttending

      vPatientName=rstAuthors("PatientName")

      vID=rstAuthors("ID")

      vRoom=rstAuthors("Room")

      vCheckIn=rstAuthors("CheckIn")

      vAttending=rstAuthors("attending")

       

      msgbox  vPatientName  /// It returns result as "Vivek"

       

       

      SET Result =ActiveDocument.DynamicUpdateCommand ("UPDATE * SET Room='"&vRoom&"',PatientName='"&vPatientName&"',CheckIn='"&vCheckIn&"',attending='"&vAttending&"' WHERE ID='"&vID&"';") / But This Query is not working

       

       

      please let me know the syntax of this

       

      Thanks In advance.

       

      Regards,

      Kabilan K.