Ask a Question related to Macromedia Dynamic HTML, Design and Development.
-
Amcasperforu #1
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"> </td>
</tr>
<tr>
<td>School Organization Adviser(s)<br>
(separate names with comma) </td>
<td><textarea name="txtOrganizationAdvisers" cols="50"
id="textarea"></textarea> </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> </td>
<td><input name="btnClear" type="reset" id="btnClear" value="Clear">
<input name="btnEdit" type="submit" id="btnEdit" value="Update"></td>
</tr>
</table>
<p> </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
-
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... -
Whats problem with this query?
Hi i dynamically generating an insert query. <cfquery name="s" datasource="dsnname"> #query# </cfquery> the query contains this query:... -
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,... -
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. ... -
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:... -
Lionstone #2
Re: Whats the problem with my SQL???
You haven't passed your connection to the recordset.
Lionstone Guest



Reply With Quote

