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!

Are there different versions of ASP?

Status
Not open for further replies.

roycet

Technical User
Aug 3, 2000
9
US
My question seems a little odd to me even.&nbsp;&nbsp;I have developed an ASP page on Microsoft PWS that works perfectly.&nbsp;&nbsp;I have recently moved this work to a new Windows NT server.&nbsp;&nbsp;On this server, almost everything works except the following script which concatantes the entries from the same field in two different records and deletes the second record if another field holds identical data for those two records.&nbsp;&nbsp;My question is: is there any reason why a script would work on one server but not on another?<br><br><br><br>If Not objRec.BOF And objRec.recordcount &gt; 1 Then<br>&nbsp;&nbsp;Dim recIndex, id, author <br>&nbsp;&nbsp;recIndex = 0<br>&nbsp;&nbsp;While Not objRec.EOF<br>&nbsp;&nbsp;&nbsp;&nbsp;id = objRec(&quot;RefID&quot;)<br>&nbsp;&nbsp;&nbsp;&nbsp;author = objRec(&quot;AUTHOR&quot;)<br>&nbsp;&nbsp;&nbsp;&nbsp;objRec.moveprevious<br>&nbsp;&nbsp;&nbsp;&nbsp;While Not objRec.BOF<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;If objRec(&quot;RefID&quot;) = id Then<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;objRec(&quot;AUTHOR&quot;) = objRec(&quot;AUTHOR&quot;) & &quot; / &quot; & author<br> objRec.move adBookMarkFirst, recIndex<br> objRec.delete<br> objRec.moveprevious<br> id = objRec(&quot;RefID&quot;) <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;End If<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;objRec.moveprevious<br>&nbsp;&nbsp;&nbsp;&nbsp;WEnd<br>&nbsp;&nbsp;&nbsp;&nbsp;recindex = recindex + 1<br>&nbsp;&nbsp;&nbsp;&nbsp;objRec.Move adBookMarkFirst, recindex<br>&nbsp;&nbsp;WEnd<br>End If<br>
 
Are you receiving a specific error or is it just not working correctly?&nbsp;&nbsp;Make sure you're connecting to the same database.&nbsp;&nbsp;Also, you may need to make sure both machines have the same version of MDAC installed.&nbsp;&nbsp;Download the latest version from <A HREF=" TARGET="_new"> <p>Monte Kalisch<br><a href=mailto:montek@montekcs.com>montek@montekcs.com</a><br><a href= MVP for ASP</a><br>
 
Yeah, I connect to the databse fine for other functions of the web site.&nbsp;&nbsp;There are no errors.&nbsp;&nbsp;I still get results for the page using the above script, the entries I want concatanated just stay in seperate records on the new server, tho.&nbsp;&nbsp;Again, the script works fine on PWS.&nbsp;&nbsp;I have no idea why id doesn't on the NT server.
 
Dear roycet,<br><br>&gt; If Not objRec.BOF And objRec.recordcount &gt; 1 Then<br><br>If that condition evaluates to false then none of the code will execute. Try putting some code inside the block that ouputs to the page for verification, i.e.:<br><br>If Not objRec.BOF And objRec.recordcount &gt; 1 Then<br>&nbsp;&nbsp;Response.Write &quot;&lt;!-- processing objRec --&gt;&quot;<br><br>Good luck<br>-pete
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top