Wrox Programmer Forums
|
ASP Pro Code Clinic As of Oct 5, 2005, this forum is now locked. No posts have been deleted. Please use "Classic ASP Professional" at: http://p2p.wrox.com/forum.asp?FORUM_ID=56 for discussions similar to the old ASP Pro Code Clinic or one of the other many remaining ASP and ASP.NET forums here.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP Pro Code Clinic section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old July 23rd, 2003, 03:40 PM
boo boo is offline
Registered User
 
Join Date: Jul 2003
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default searge page

I must key in FirstName, LastName and IcNo to searching, and it will display the data from member, how to do it? Can u please modify my coding? It display nothing and why display the admin MemberId? Pls show me clearer..
My coding showing below:



<%
'open the database connection
Set con=Server.CreateObject("ADODB.Connection")
'con.open "Provider=SQLOLEDB.1; Password=; UserID=BOO; Initial Catalog=dta; Data Source=webserver;"
con.open "DSN=dta"

Set rs=Server.CreateObject("ADODB.Recordset")
rs.CursorType=adOpenStatic
rs.CursorLocation=adUseServer
rs.LockType=adLockBatchOptimistic

if trim(request.form("FirstName"))<> " " and _
   trim(request.form("LastName"))<> " " and _
   trim(request.form("IcNo"))<> " " then

sql= "Select * from Member where FirstName=' " &_
    trim(request.form("SFirstName")) &_
    "' and LastName='" & trim(request.form("SLastName")) &_
    "' and IcNo='" & trim(request.form("SIcNo")) & "'"
else
    response.redirect "Error_no_record.asp"
end if

con.close
set con=nothing
set rs=nothing
%>


 
Old July 24th, 2003, 12:30 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 215
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I don't see any code that executes the SQL statement or that writes the resulting data to the page.

regards
David Cameron





Similar Threads
Thread Thread Starter Forum Replies Last Post
how to prevent a web page/window page from copying pradeeppatnaik81 C# 2 April 9th, 2008 03:36 AM
access C#.Net page as action of calssic ASP page mansharma_s ASP.NET 1.x and 2.0 Application Design 6 January 7th, 2008 10:58 AM
How to pass the variables in Aspx page to Asp Page jayaraj ASP.NET 1.0 and 1.1 Basics 3 May 23rd, 2004 06:55 AM
searge page... boo Classic ASP Components 0 July 23rd, 2003 03:39 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.