Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ADO error 3265

Status
Not open for further replies.

delorfra

Programmer
Mar 8, 2001
79
FR
Intranet Server : NT4/IIS4
Database : Oracle

I tried to access an Oracle Database through a system DSN set-up on the server (Microsoft Oracle driver) an get the

3265 ADO error message :
"Item cannot be found in the collection corresponding to the requested name or ordinal."

When I run the same program on my local W2K machine ( it works fine but not when run from the server ( The DSN has been set up the same way on both machines then pointing to the same database, so no tables/fields mistypes involved.

here is my script :

<%@ Language=VBScript%>
<!--#include virtual=&quot;/adovbs.inc&quot;-->
<HTML>
<HEAD><TITLE>ASP CONNECTION TRIAL</TITLE></HEAD>
<BODY>
<%
ON ERROR RESUME NEXT
Set objConnection = Server.CreateObject(&quot;ADODB.Connection&quot;)
objConnection.Open &quot;DSN=SGQS; UserId=sgqs; pwd=toto&quot;
Set oRS=Server.CreateObject(&quot;ADODB.recordset&quot;)
SQL = &quot;Select * from PILOTE&quot;
oRS.Open SQL, objConnection
oRS.Movefirst
Response.Write oRS.Fields(&quot;CDPILOTE&quot;) & &quot;<BR>&quot;

Response.Write SQL & &quot;<BR>&quot;

IF err.Number <>0 then
response.write &quot;Number : &quot; & err.Number & &quot;<P>&quot;
response.write &quot;Descr : &quot; & err.description & &quot;<P>&quot;
response.write &quot;Source : &quot; & err.source & &quot;<P>&quot;
err.clear
end if

oRS.Close
set oRS=Nothing
objConnection.Close
set objConnection=Nothing
%>

</BODY>
</HTML>>
 
For those interested.
The error message stopped when I decided to replace the DNS connection with an OLEDB connection.

Very strange ???

I am still interested if anybody knows why it did not work with DNS/IIS4 and worked with DSN/IIS5 or OLEDB/IIS4 or 5.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top