SQL Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
 
User Name:
Password:
Remember me
Go Back   ASP Free ForumsDatabaseSQL Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread ASP Free Forums Sponsor:
  #1  
Old July 20th, 2000, 06:14 PM
Steve Schofield Steve Schofield is offline
Contributing User
ASP Free God 20th Plane (14500 - 14999 posts)
 
Join Date: Dec 2002
Posts: 14,575 Steve Schofield User rank is Corporal (100 - 500 Reputation Level)Steve Schofield User rank is Corporal (100 - 500 Reputation Level)Steve Schofield User rank is Corporal (100 - 500 Reputation Level)Steve Schofield User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 22
search.asp

<i><b>Originally posted by : lakshmi (sanchez@sheriff.ccso.org)</b></i><br /><br />I managed to get my search.asp to display data, however, i do not know how it is basing its display on.<br />Can someone look at my code, and tell me how I can get it so that a user can enter either of all those fields whether partially or not or just one of those fields and then be able to get a list of the names. I cannot figure out how to get it to do it. I am getting data now which is better than getting a blank page, but I am not getting the correct data.<br /><br /><%@ Language=VBScript %><br /><HTML><br /><HEAD><br /><TITLE>Query Results</TITLE><br /></HEAD><br /><BODY><br /><TABLE BORDER=1><br /><%<br /><br />Set Conn = Server.CreateObject("ADODB.Connection")<br />Set Buss = Server.CreateObject("ADODB.Recordset")<br />Conn.Open "DSN=BusinessBarcode;UID=sa;pwd=;"<br /><br />sSQL = "SELECT * "<br />sSQL = sSQL & " FROM [Business Master]"<br />sSQL = sSQL & " WHERE Business LIKE Business"<br />sSQL = sSQL & " AND Address LIKE Address"<br />sSQL = sSQL & " AND Barcode LIKE Barcode"<br /><br />Buss.Open sSQL,Conn<br />Do While Not Buss.EOF<br />Response.Write "<tr><td>" & Buss("Business") & "</td><td>" & Buss("Address") & "</td><td>" & Buss("Barcode") & "</td></tr>"<br />Response.Write vbcrlf<br />Buss.MoveNext<br />Loop<br />Buss.Close<br />Conn.Close<br /><br />%><br /></TABLE><br /></BODY><br /></HTML><br /><br />Any suggestions or perhaps you can point me to where there is a sample of something similar?<br /><br />Thank you <br /><br /><br />

Reply With Quote
  #2  
Old July 25th, 2000, 02:59 AM
Steve Schofield Steve Schofield is offline
Contributing User
ASP Free God 20th Plane (14500 - 14999 posts)
 
Join Date: Dec 2002
Posts: 14,575 Steve Schofield User rank is Corporal (100 - 500 Reputation Level)Steve Schofield User rank is Corporal (100 - 500 Reputation Level)Steve Schofield User rank is Corporal (100 - 500 Reputation Level)Steve Schofield User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 22
<i><b>Originally posted by : srinivas (telut@yahoo.com)</b></i><br />Try "AND" in sSQL replaced with "OR".You might get probably what U want.There nothing wrong with asp code.<br /><br /><br />------------<br />lakshmi at 7/20/2000 4:14:34 PM<br /><br /><br />I managed to get my search.asp to display data, however, i do not know how it is basing its display on.<br />Can someone look at my code, and tell me how I can get it so that a user can enter either of all those fields whether partially or not or just one of those fields and then be able to get a list of the names. I cannot figure out how to get it to do it. I am getting data now which is better than getting a blank page, but I am not getting the correct data.<br /><br /><%@ Language=VBScript %><br /><HTML><br /><HEAD><br /><TITLE>Query Results</TITLE><br /></HEAD><br /><BODY><br /><TABLE BORDER=1><br /><%<br /><br />Set Conn = Server.CreateObject("ADODB.Connection")<br />Set Buss = Server.CreateObject("ADODB.Recordset")<br />Conn.Open "DSN=BusinessBarcode;UID=sa;pwd=;"<br /><br />sSQL = "SELECT * "<br />sSQL = sSQL & " FROM [Business Master]"<br />sSQL = sSQL & " WHERE Business LIKE Business"<br />sSQL = sSQL & " AND Address LIKE Address"<br />sSQL = sSQL & " AND Barcode LIKE Barcode"<br /><br />Buss.Open sSQL,Conn<br />Do While Not Buss.EOF<br />Response.Write "<tr><td>" & Buss("Business") & "</td><td>" & Buss("Address") & "</td><td>" & Buss("Barcode") & "</td></tr>"<br />Response.Write vbcrlf<br />Buss.MoveNext<br />Loop<br />Buss.Close<br />Conn.Close<br /><br />%><br /></TABLE><br /></BODY><br /></HTML><br /><br />Any suggestions or perhaps you can point me to where there is a sample of something similar?<br /><br />Thank you <br /><br /><br />

Reply With Quote
Reply

Viewing: ASP Free ForumsDatabaseSQL Development > search.asp


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway
Stay green...Green IT