Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: Oracle and ASP Error

Re: Oracle and ASP Error

From: Jim Kennedy <kennedy-downwithspammersfamily_at_attbi.com>
Date: Wed, 09 Apr 2003 15:22:01 GMT
Message-ID: <tUWka.416610$S_4.484608@rwcrnsc53>


what the heck is: TRIM(BOTH ' ' FROM ADDR1) in a sql statement? Never seen that in Oracle
Jim
"Jay" <jerry280_at_yahoo.com> wrote in message news:xGWka.8$Hg5.13910_at_news.uswest.net...
> Hello everyone! I've created an ASP application to connect to an Oracle
> database. I used a file DSN but am now getting the following error
message:
>
> Microsoft OLE DB Provider for ODBC Drivers error '80040e21'
>
> ODBC driver does not support the requested properties.
>
> This error message is for the following line of code:
> RS.open SQL, conn, 1, 2
>
> Following is my ASP code. Can anyone help me figure out why I am getting
the
> message? Also, is there a better way to connect to the Oracle database
> instead of a file DSN? I've heard arguments for DSN connections and
DSN-Less
> connections with Oracle and am finding that the DSN connection isn't
working
> so well.
>
> <body>
> <%
> Dim FormKey, ConStr, RS, SQL, conn
> For Each FormKey in Request.Form
> Session(FormKey) = Replace(Request.Form.Item (FormKey), "'", "''")
> Next
>
> set conn=Server.CreateObject("ADODB.Connection")
> conn.ConnectionTimeout=15
> conn.open "FILEDSN=C:\Program Files\Common Files\ODBC\Data
> Sources\Detective.dsn;" & _
> "uid=USERID;" & _
> "pwd=PASSWORD;" & _
> "server=ORACLESERVERNAME;"
>
> Set RS = Server.CreateObject("ADODB.RecordSet")
> SQL = "SELECT HOUSE_KEY, STREET, LOT FROM VADDRESS_BASE WHERE" & _
> "TRIM(BOTH ' ' FROM ADDR1) = '" & session.value("HouseNumber") & "' AND
> CITY" & _
> "= '" & UCASE(session.value("AddressCity")) & "' ORDER BY STREET, LOT;"
> RS.open SQL, conn, 1, 2
> if not RS.eof then
> %>
> <form action="dish2.asp" method="post">
> <input type="hidden" name="inc" value="2">
> <table border="0" summary="layout" align="center">
> <tr>
> <td class="label">House Number: </td>
> <td class="value"><%=session.value("HouseNumber")%></td>
> </tr>
> <tr>
> <td class="label">City:
> </td>
> <td
> class="value"><%=session.value("AddressCity")%></td>
> </tr>
> <tr>
> <td class="label">Street:
> </td>
> <td class="value">
> <select name="HouseID">
> <%
> do until RS.eof
> %>
> <option value="<%=RS("HOUSE_KEY")%>"><%=RS("STREET")%>.
> <%=RS("LOT")%></option>
> <%
> RS.movenext
> loop
> %>
> </select>
> <%
> else
> msg = session.value("HouseNumber") & " in " &
> session.value("AddressCity") & " is not a recognized address."
> session.abandon
> Response.Write("<" & "script>alert('" & msg & "');")
> Response.Write("location.href='dish.asp'")
> Response.Write("<" & "/script>")
> end if
> RS.close
> set RS = nothing
> conn.close
> set conn = nothing
> %>
> </td>
> </tr>
> <tr>
> <td colspan="2" align="center"><input type="submit" name="submitBTN"
> value="Next -->"></td>
> </tr>
> </table>
> </form>
> </body>
>
> Thank you!
>
> J
>
>
Received on Wed Apr 09 2003 - 10:22:01 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US