Whats the problem with my SQL???

Ask a Question related to Macromedia Dynamic HTML, Design and Development.

  1. #1

    Default Whats the problem with my SQL???

    I'm having problem with my SQL Statement, can anyone help me?
    Here's the error:
    Error Type:
    ADODB.Recordset (0x800A0E7D)
    The connection cannot be used to perform this operation. It is either closed
    or invalid in this context.
    /thesis/adminOrganizationEditForm.asp, line 43

    Here's my code:
    7
    <%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
    <html>
    <head>
    <title>Edit existing school organization</title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    <style type="text/css">
    <!--
    .style1 { color: #FFFFFF;
    font-size: 24px;
    }
    .style2 {color: #FFFFFF}
    body {
    background-image: url(Images/pattern3.gif);
    margin-top: 8px;
    margin-bottom: 0px;
    }
    a:link {
    color: #CFFFFF;
    }
    a:visited {
    color: #CFFFFF;
    }
    a:hover {
    color: #FFFF99;
    }
    body,td,th {
    color: #CFFFFF;
    }
    -->
    </style>
    <body>
    <%
    If Session("sUserName") <> "" AND Session("sPassword") <> "" Then

    Dim DB, organizationRS, deptName, deptID, orgAbb, orgName, orgAdvisers,
    logUserName, logPassword
    Set DB = Server.CreateObject("adoDB.connection")
    DB.Mode = adModeReadWrite
    DB.Provider = "MICROSOFT.JET.OLEDB.4.0"
    DB.ConnectionString = Server.MapPath("myDatabase.mdb")
    DB.Open
    Set organizationRS = Server.CreateObject("adoDB.recordset")
    organizationRS.Open "SELECT organizationTB.*, departmentTB.*, loginTB.* FROM
    adminTB, (departmentTB INNER JOIN organizationTB ON departmentTB.departmentID =
    organizationTB.departmentID) INNER JOIN loginTB ON
    organizationTB.organizationAbb = loginTB.organizationAbb WHERE
    ((([organizationTB.organizationAbb])='JITS'));"
    %>

    <form action="adminOrganizationEditProcess.asp" method="post"><br>
    <br>
    <table width="627" border="0" align="center" bordercolor="#000000">
    <tr bgcolor="#003737">
    <td width="144" bgcolor="#003737"><div align="center"><a
    href="adminOrganizationAdd.asp">Add new Organization </a></div></td>
    <td width="112" bgcolor="#999999"> <div align="center">Edit Organization
    </div></td><td width="127" bgcolor="#003737"><div align="center"><a
    href="adminOrganizationDelete.asp">Delete Organization </a> </div></td>
    <td width="121"><div align="center"><a href="adminOrganizationList.asp">List
    Organizations </a></div></td>
    <td width="93"><div align="center"><a href="adminAccountMenu.asp">back to Menu
    </a></div></td>
    </tr>
    </table>
    <br><br>
    <table width="639" border="1" align="center">
    <tr>
    <td colspan="2"><strong> Information about the School
    Organization</strong></td>
    </tr>
    <tr>
    <td width="298">School Organization Alias </td>
    <td width="325"><select name="cmbOrganization" size="1" id="cmbOrganization"
    disabled>
    <option value="randy"><%=organizationRS.Fields("organizati onAbb")%></option>
    </select></td>
    </tr>
    <tr>
    <td>Department</td>
    <td><input name="txtDepartment" type="text" id="txtDepartment" value =
    <%=organizationRS.Fields("departmentTB.departmentN ame")%> size="50"
    maxlength="50"></td>
    </tr>
    <tr>
    <td height="23">School Organization Full Name </td>
    <td><input name="txtOrganizationName" type="text" id="txtOrganizationName"
    size="50" maxlength="50"> &nbsp; </td>
    </tr>
    <tr>
    <td>School Organization Adviser(s)<br>
    (separate names with comma) </td>
    <td><textarea name="txtOrganizationAdvisers" cols="50"
    id="textarea"></textarea> &nbsp; </td>
    </tr>
    <tr>
    <td colspan="2"><strong>School Organization Access Code </strong></td>
    </tr>
    <tr>
    <td>User Name</td>
    <td><input name="txtOrganizationUserName" type="text"
    id="txtOrganizationUserName" size="20" maxlength="20"></td>
    </tr>
    <tr>
    <td>Password</td>
    <td><input name="txtOrganizationPassword" type="password"
    id="txtOrganizationPassword" size="20" maxlength="20"></td>
    </tr>
    <tr>
    <td>&nbsp;</td>
    <td><input name="btnClear" type="reset" id="btnClear" value="Clear">
    <input name="btnEdit" type="submit" id="btnEdit" value="Update"></td>
    </tr>
    </table>
    <p>&nbsp;</p>
    <%
    organizationRS.Close()
    Set organizationRS = Nothing
    Else%>
    <br><br>
    <table width="641" border="0" align="center">
    <tr>
    <td bgcolor="#FF0000"><div align="center"><Font color="#FFFFFF" size="+1">You
    are unauthorize to access this page, please sign in</Font></div></td>
    </tr>
    </table>
    <br>
    <table width="140" border="0" align="center">
    <tr>
    <td><div align="center"><Font color="0000FFF" size="2"><A
    href="adminAccount.asp">click here to sign in</A></Font></div></td>
    </tr>
    </table>
    <% End If %>
    </form>
    </body>
    </html>

    Amcasperforu Guest

  2. Similar Questions and Discussions

    1. Whats the best way ??
      I have just purchased Contribute to allow our marketing department to add content to our web site. Up until now I've had a local copy on my C drive...
    2. Whats problem with this query?
      Hi i dynamically generating an insert query. <cfquery name="s" datasource="dsnname"> #query# </cfquery> the query contains this query:...
    3. tell me whats the problem here
      please go to www.firstacademy.net/dev/ i loaded external swfs on 2 scrollpane components. It worked pretty fine locally. but when i uploaded it,...
    4. CSS Whats the problem here?
      Hi Guys I have used CSS to control the hover on the menu of my site. It works fine is dreamweaver but only works on a few links on the site. ...
    5. Whats the problem
      Hi I have a script for a shopsystem on a Linux. There it works fine. But when I try to run it on my Windows machine, PHP says things like Notice:...
  3. #2

    Default Re: Whats the problem with my SQL???

    You haven't passed your connection to the recordset.


    Lionstone Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139