i mention the error i dont know what to do i new to script...

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • siva125
    New Member
    • Feb 2010
    • 9

    i mention the error i dont know what to do i new to script...

    Code:
    <!-- #include file="connection.inc"-->
    
    <HTML>
    <HEAD>
    <META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0">
    <TITLE></TITLE>
    </HEAD>
    <BODY>
    <FORM NAME=f1 METHOD=post ACTION=errlog.ASP>
    <%
       
      set rs1=server.CreateObject("adodb.recordset")
      
    %>
    
    <P>MODULE REF&nbsp;<SELECT id=c name=c onchange=window.f1.submit();> 
      
      <option value=1>LOCKER</option>
      <OPTION value=2>BAGIC</option>
      <option value=3>MF</option>
      </SELECT>&nbsp; 
    </P>
    <%
       if(c=1) then
         sql1="select MODULE_ID,BR_LOGIN_USER,ACTION_PERFORMED,ACTION_TIME,MODULE_REMARKS from FRS_AUDIT_LOG@frsutil where MODULE_ID LIKE '"+LOCKER+"'"
         rs1.Open sql1,conn
       else if(c=2) then
         sql1="select MODULE_ID,BR_LOGIN_USER,ACTION_PERFORMED,ACTION_TIME,MODULE_REMARKS from FRS_AUDIT_LOG@frsutil where MODULE_ID LIKE '"+BAGIC+"'"
         rs1.Open sql1,conn
       else if(c=3)then
         sql1="select MODULE_ID,BR_LOGIN_USER,ACTION_PERFORMED,ACTION_TIME,MODULE_REMARKS from FRS_AUDIT_LOG@frsutil where MODULE_ID LIKE '"+MUTUAL_FUND+"'"
         rs1.Open sql1,conn
       else
         sql1="SELECT sysdate from dual"
         rs1.Open sql1,conn
    %>
    <TABLE border=1>
    <TR style="COLOR: darkgreen">
      <td><p align=center><b><FONT size=4>MODULE</b></FONT><p></p></td> 
      <td><P align=center><B><FONT size=4>USER </B></FONT></P></td>
      <td><P align=center><B><FONT size=4>ACTION</B></FONT></P></td>
      <td><P align=center><B><FONT size=4>TIME</B></FONT></P></td>
      <td><P align=center><B><FONT size=4>REMARKS</B></FONT></P></td></TR>
    <%
    do until rs1.eof
    %>
    <tr>
    <TD><%Response.Write rs1(0)%></TD>
    <TD><%Response.Write rs1(1)%></TD>
    <TD><%Response.Write rs1(2)%></TD>
    <TD><%Response.Write rs1(3)%></TD>
    <TD><%Response.Write rs1(4)%></TD>
    
    <%
    rs1.movenext
    loop
    rs1.close
    end if
    end if
    end if
    
    %></tr>
    
     </TABLE>
     </FORM>
    </BODY>
    </HTML>

    error occured:Item cannot be found in the collection corresponding to the requested name or ordinal. "i checked query its correct i feel in program flow may be error occur"
    Last edited by Frinavale; Feb 17 '10, 03:25 PM. Reason: Please post code in [code] ... [/code] tags. Added code tags.
  • jhardman
    Recognized Expert Specialist
    • Jan 2007
    • 3405

    #2
    It sounds to me like you are not connecting to the right database. Are there more than one db on the server? It looks like the connection string is in the include file, so I can't see how you are doing the connection, but you can specify which db to use in the connection string. You can also specify which db to use in the query:
    Code:
    "use dbname; Select..."
    or
    "Select... from dbname.tablename
    Let me know if this helps

    Jared

    Comment

    • jhardman
      Recognized Expert Specialist
      • Jan 2007
      • 3405

      #3
      hi,
      still some pbm in finding error the sql is correct i check in navigator but in flow of program may be fault .....pl ..can u check....
      The sql may be correct, but that doesn't mean the script is connecting to the right database. You need to check the db connection, I think you are either connecting to the wrong location, or not specifying the database.

      Jared

      Comment

      Working...