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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

difference between: Close oRS and oRS.Close

Status
Not open for further replies.
May 31, 2000
13
US
I have been using the WROX book &quot;Beginning ASP Databases. I keep coming up against these weird errors using the code as supplied by the book (downloaded in a zip file off the wrox website and opened in visual interdev)<br><br>here is the simple code:<br><br>dim oRS<br>set oRS=Server.CreateObject (&quot;ADODB.recordset&quot;)<br>sqltext= &quot;SELECT&nbsp;&nbsp;suite, phone&quot;<br>sqltext= sqltext & &quot; From PChookup ;&quot;<br>oRS.Open sqltext, oConn<br><br>Response.Write &quot;&lt;table border = 1&gt;&lt;TR&gt;&lt;TD&gt;&quot;<br>Response.Write oRS.GetString (,-1,&quot;&lt;/TD&gt;&lt;TD&gt;&quot;,&quot;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&quot;,&quot;&nbsp;&quot;)<br>Response.Write &quot;&lt;/TD&gt;&lt;/TR&gt;&lt;/table&gt;&quot;<br><br>'close oRS<br>oRS.Close<br><br>set oRS = nothing<br><br><br>---------------------------------<br>Notice how i have commented out the &quot;close oRS&quot;?<br>That was the original code as supplied.&nbsp;&nbsp;I kept getting errors stating that it was a type mismatch open.<br>I don't really know that much about ASP yet, but I just looked at the method that opened the oRS (oRS.open sqltext, oConn)<br>and tried to close it with <br>&quot;oRS.close&quot; then uploaded and ran the code again.<br><br>It worked perfectly with my change in that part of the code.<br><br>My question is:&nbsp;&nbsp;What would be the reason for the textbook supplied code NOT working on my server?&nbsp;&nbsp;I am running NT4.0 with service pack 5 and IIS 4.0, <br>Pervasive SQL server 7.0
 
oops.. I mean the error that was given was<br><br>type mismatch close
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top