[thelist] ASP Query Issue

Peter Brunone (EasyListBox.com) peter at easylistbox.com
Sat Jul 15 15:33:37 CDT 2006


		   You haven't added an "on error resume next" somewhere -- like in the top.asp include -- have you?  That could be suppressing any messages from errors during execution.  

   If you're not doing that, I'd still suggest calling View Source in the browser to see if there's an error message hidden between HTML tags (usually at the bottom of the file, where it would have been cut off when the error occurred).

HTH,

Peter

----------------------------------------

				From: "My Mailing List" <my.mailing.lists at gmail.com>
Sent: Saturday, July 15, 2006 12:28 PM
To: thelist <thelist at lists.evolt.org>
Subject: [thelist] ASP Query Issue 

I'm at my wits end right now...every time I try to run a query through my ASP page, it fails to find any matching records...but when I output the SQL and the put it directly into MS Access, it works perfect. This is the query: SELECT * FROM [Search_Words] WHERE TRIM([Word]) = 'kidspiration' I'll post the entire page below...but this is the query that's being the pain. Any ideas/suggestions would be greatly appreciated. Thanks, Scott PS. the connection string/variables are included via the top.asp file. the connection string looks like this: path = server.mappath("../../db/gwt-data.mdb") strCOnn = "Provider= Microsoft.Jet.OLEDB.4.0;Data Source=" & path & ";" ==================================================================== <%server.ScriptTimeout = 999999%> 1 then
            SQL = "SELECT * FROM [Search_Words] WHERE TRIM([Word]) = '" &
lcase(w) & "'"
            response.write sql & "
"
            set rs2 = objConn.execute(SQL)

            if not rs.eof then
                response.write len(w) & "-" & w & "-1
"

                'SQL = "INSERT INTO [Search_Matches](WordID, ItemID, Title)
VALUES(" & rs2("wordid") & ", " & g & ", " & z & ")"
                'objConn.execute(SQL)
            else
                response.write len(w) & "-" & w & "-2
"

                SQL = "INSERT INTO [Search_Words](Word) VALUES('" & w & "')"

                objConn.execute(SQL)

                'SQL = "SELECT @@IDENTITY as T FROM [Search_Words]"
                'set rs3 = objConn.execute(SQL)

                'z = rs3("t")

                'rs3.close
                'set rs3 = nothing

                'SQL = "INSERT INTO [Search_Matches](WordID, ItemID, Title)
VALUES(" & z & ", " & g & ", " & z & ")"
                'objConn.execute(SQL)
            end if
        end if
    next
end sub

call openDB(objConn)

function prep(str)
    prep = str

    p = "~i!i at i#i$i%i^i&i*i(i)i_i+i=i-i`i[i]i\i{i}i|i;i'i:i""i, i.i
/ii?i1i2i3i4i5i6i7i8i9i0i?"
    parr = split(p, "i")

    if len(prep)  0 then
        prep = replace(prep, vbCrLf, " ")
        prep = replace(prep, vbCr, " ")
        prep = replace(prep, vbLf, " ")
        for q = lbound(parr,1) to ubound(parr,1)
            prep = replace(prep, parr(q), " ")
        next
    end if

    prep = lcase(prep)
end function

SQL = "SELECT top 3 * FROM [Software-Titles]"
set rs = objConn.execute(SQL)

if not rs.eof then
    arr = rs.getrows()

    for i = lbound(arr,2) to ubound(arr,2)
        t = prep(arr(2,i))
        e = prep(arr(3,i))
        d = prep(arr(4,i))

        ta = split(t, " ")
        ea = split(e, " ")
        da = split(d, " ")

        g = arr(0,i)

        r = ta
        z = 1
        call go(r, z, g)

        r = ea
        z = 0
        call go(r, z, g)

        r = da
        z = 0
        call go(r, z, g)
    next
end if

rs.close
set rs = nothing

call closeDB(objConn)
%>]]>-- * * Please support the community that supports you. * * http://evolt.org/help_support_evolt/ For unsubscribe and other options, including the Tip Harvester and archives of thelist go to: http://lists.evolt.org Workers of the Web, evolt !




More information about the thelist mailing list