Welcome to the dBforums forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions, articles and access our other FREE features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload your own photos and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact contact support.

If you prefer not to see double-underlined words and corresponding ads, place your cursor
here for ContentLink opt out.

Go Back  dBforums > Data Access, Manipulation & Batch Languages > ASP > how to remove the query statement?

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 09-10-04, 22:52
gilgalbiblewhee gilgalbiblewhee is offline
Registered User
 
Join Date: Jul 2004
Posts: 448
how to remove the query statement?

I have this on top of my ASP response page:
Code:
SELECT * FROM bible WHERE text_data LIKE '%%' AND text_data LIKE '%%' AND text_data LIKE '%%' AND ( recordType = 'ju')


How can I remove it?
Reply With Quote
  #2 (permalink)  
Old 09-11-04, 02:12
Seppuku Seppuku is offline
Useless...
 
Join Date: Jul 2003
Location: SoCal
Posts: 721
Sounds like you have a "Response.Write" somewhere in your code.
__________________
That which does not kill me postpones the inevitable.
Reply With Quote
  #3 (permalink)  
Old 09-11-04, 11:41
gilgalbiblewhee gilgalbiblewhee is offline
Registered User
 
Join Date: Jul 2004
Posts: 448
This is what I have

This is what I have:

Code:
SQL = "SELECT * FROM bible WHERE " ' only the statement within the qoutes are showing[color=DarkRed] strConn = GetConnectionString() ' Let's see what page are we looking at right now nPage = CLng(Request.QueryString("Page")) ' Let's see what user wants to search for today :) Keyword = Trim(Request.QueryString("Keyword")) spoke = Request.Querystring("spoke") number = Request.QueryString("number") Keywordb = Request.QueryString("Keywordb") Keywordc = Request.QueryString("Keywordc") 'Set conn = Server.CreateObject("ADODB.Connection") 'conn.Open(GetConnectionString) iCounter = 0 If request.QueryString("text_data")="yes" then SQL = SQL & "text_data LIKE '%" & Keyword & "%' AND " SQL = SQL & "text_data LIKE '%" & Keywordb & "%' AND " SQL = SQL & "text_data LIKE '%" & Keywordc & "%'" iCounter = iCounter + 1 end if If request.QueryString("book")="yes" then If iCounter > 0 Then SQL = SQL & " AND " End If SQL = SQL & "book LIKE '" & number & "'" iCounter = iCounter + 1 end if If request.QueryString("book_title")="yes" then If iCounter > 0 Then SQL = SQL & " AND " End If SQL = SQL & "book_title LIKE '%" & number & "%'" iCounter = iCounter + 1 end if If request.QueryString("chapter")="yes" then If iCounter > 0 Then SQL = SQL & " AND " End If SQL = SQL & "chapter LIKE '%" & number & "%'" iCounter = iCounter + 1 end if If request.QueryString("verse")="yes" then If iCounter > 0 Then SQL = SQL & " AND " End If SQL = SQL & "verse LIKE '%" & number & "%'" iCounter = iCounter + 1 end if If request.QueryString("book_spoke")="Book_Spoke" then If iCounter > 0 Then SQL = SQL & " AND " End If SQL = SQL & "book_spoke = '" & spoke & "'" iCounter = iCounter + 1 end if If request.QueryString("chapter_spoke")="Chapter_Spoke" then If iCounter > 0 Then SQL = SQL & " AND " End If SQL = SQL & "chapter_spoke = '" & spoke & "'" iCounter = iCounter + 1 end if If request.QueryString("verse_spoke")="Verse_Spoke" then If iCounter > 0 Then SQL = SQL & " AND " End If SQL = SQL & "verse_spoke = '" & spoke & "'" iCounter = iCounter + 1 end if If Trim(Request.QueryString("recordType")) <> "" Then aRecTypes = Split(Request.QueryString("recordType"), ",") If IsArray(aRecTypes) Then 'This is a bit redundant, but it can't hurt SQL = SQL & " AND (" For iLoopCount = 0 To UBound(aRecTypes) If iLoopCount <> 0 Then SQL = SQL & " OR " End If SQL = SQL & " recordType = '" & trim(aRecTypes(iLoopCount)) & "'" Next End If SQL = SQL & ")" End If
Reply With Quote
  #4 (permalink)  
Old 09-12-04, 03:31
Seppuku Seppuku is offline
Useless...
 
Join Date: Jul 2003
Location: SoCal
Posts: 721
Is that the only code on the page?
__________________
That which does not kill me postpones the inevitable.
Reply With Quote
  #5 (permalink)  
Old 09-12-04, 12:18
gilgalbiblewhee gilgalbiblewhee is offline
Registered User
 
Join Date: Jul 2004
Posts: 448
You were right

Quote:
Originally Posted by Seppuku
Is that the only code on the page?
There was a Response.Write earlier.
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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
Trackbacks are On
Pingbacks are On
Refbacks are On