|
-
Apr 3rd, 2003, 01:36 PM
#1
Thread Starter
New Member
List box query
Jo sorry to trouble you. You seem to know alot about asp. I have a listbox which reads options from the database. I have posted the value of the option to another page, I have then used this value to search a database. I want the result to be displayed in a txtbox. Below is the code I have written, but it does not work. It is probably something small could you please make my day again this is for my final year project. You can email me on [email protected]
dim me2, Desc
me2 = request.form("Books")
response.write me2
Set objCon = Server.CreateObject( "ADODB.Connection" )
objCon.ConnectionString = "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & _
Server.MapPath("myManage.mdb") & ";"
objCon.Open
' Open the Recordset
Set objRS = Server.CreateObject( "ADODB.Recordset" )
objRS.ActiveConnection = objCon
objRS.CursorType = 3
objRS.Open "SELECT * FROM Category WHERE CatCode=" & me2
IF NOT objRS.EOF THEN
mo = objRS( "Description" )
END IF
objRS.close
%>
<form action="me.asp" method="post">
<table width="600" border="0">
<tr>
<td><label>Categories</label> </td>
<td><input type="text" name="Desc" value"<%=mo%>"></td>
</tr>
</table>
</form>
</body>
</html>
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|