ASP Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
 
User Name:
Password:
Remember me
Go Back   ASP Free ForumsProgrammingASP 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 June 16th, 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
access sql form to asp

<i><b>Originally posted by : Colin (colinduetta@graduates.iti.com)</b></i><br />Giday all, my first ever forum question. I have the following SQL form in access working well, but I need to convert to an asp, I'm using a DSNless connection, no prob. The question is do I/can I return my data, and what do I change to accomplish this feat?<br />Cheers, Report---<br /><br /><br />Option Compare Database<br />Option Explicit<br /><br /><br /><br />Private Sub cboCuisine_AfterUpdate()<br />lstresult = Null<br />End Sub<br /><br />Private Sub cmdSearch_Click()<br />Dim sql As String<br />Dim rs As Recordset<br /><br />If IsNull(cboCuisine) Then<br />MsgBox "Please enter a cuisine type.", vbOKCancel, "Cusuine"<br />cboCuisine.SetFocus<br />Exit Sub<br />Else<br />sql = "Select restaurant.name from cuisine inner join (restaurant inner join rest_cuisine on restaurant.[restaurant id]=rest_cuisine.[restaurant id]) on cuisine.[flag id]=rest_cuisine.[flag id] where ((cuisine.[flag style])= '" & Me![cboCuisine] & "') "<br /><br />If Not IsNull(cboatmosphere) Then<br />sql = sql & "and (restaurant.atmosphere)= '" & Me![cboatmosphere] & "' "<br />End If<br /><br />If LCBO = True Then<br />sql = sql & "and (restaurant.Licensed) = yes "<br />End If<br /><br />If optpatio = True Then<br />sql = sql & "and (restaurant.Patio) = yes "<br />End If<br /><br />If Not IsNull(cboPriceRange) Then<br />If cboPriceRange = "<40" Then<br />sql = sql & " and (restaurant.price <= 40)"<br />ElseIf cboPriceRange = "40-60" Then<br />sql = sql & " and (restaurant.price >40 and restaurant.price <= 60)"<br />ElseIf cboPriceRange = "60-80" Then<br />sql = sql & " and (restaurant.price >60 and restaurant.price <= 80)"<br />ElseIf cboPriceRange = "80-100" Then<br />sql = sql & " and (restaurant.price >80 and restaurant.price <= 100)"<br />ElseIf cboPriceRange = ">100" Then<br />sql = sql & " and (restaurant.price >100)"<br />End If<br />End If<br /><br />End If<br />sql = sql & ";"<br />Me![lstresult].RowSource = sql<br />If Me![lstresult].ListCount < 1 Then<br />MsgBox "Your search criteria returned 0 results... slapnuts", vbOKOnly, "Search"<br />Exit Sub<br />End If<br /><br />End Sub<br /><br /><br />

Reply With Quote
Reply

Viewing: ASP Free ForumsProgrammingASP Development > access sql form to 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 5 hosted by Hostway
Stay green...Green IT