Click here to Skip to main content
15,888,330 members
Home / Discussions / ASP.NET
   

ASP.NET

 
Questionjavascript function call using ScriptManager.RegisterStartupScript Pin
anishkannan6-Apr-11 23:41
anishkannan6-Apr-11 23:41 
AnswerRe: javascript function call using ScriptManager.RegisterStartupScript Pin
Arindam Tewary7-Apr-11 1:42
professionalArindam Tewary7-Apr-11 1:42 
QuestionWhere is System.Web.Extensions, Version=3.6.0.0 ? Pin
mrquang936-Apr-11 22:23
mrquang936-Apr-11 22:23 
AnswerRe: Where is System.Web.Extensions, Version=3.6.0.0 ? Pin
Parwej Ahamad7-Apr-11 2:45
professionalParwej Ahamad7-Apr-11 2:45 
GeneralRe: Where is System.Web.Extensions, Version=3.6.0.0 ? Pin
mrquang937-Apr-11 16:02
mrquang937-Apr-11 16:02 
Questionon Autocomplete, call ashx page to get data Pin
Ravi Sant6-Apr-11 19:34
Ravi Sant6-Apr-11 19:34 
AnswerRe: on Autocomplete, call ashx page to get data Pin
ktrrzn6-Apr-11 21:12
ktrrzn6-Apr-11 21:12 
QuestionMoveNext is not moving next!! Pin
Bomb_shell6-Apr-11 10:57
Bomb_shell6-Apr-11 10:57 
First, the company prefers classic asp rather than asp.net. So, apologies to the .net gurus out there.

I've tried isolating various parts of this code and can't figure out why this returns the first record multiple times. Like, it's not moving to the next record in the recordset.

Dim ID2, RefDoc, RefRev, RefNotes, strSQL3
Set objCon = Server.CreateObject ("ADODB.Connection")
Set objRec = Server.CreateObject ("ADODB.Recordset")
strSQL3 = "SELECT * FROM UMIDRefDocs WHERE CardNo ='" & CardNo & "'"
objCon.Open strCon
objRec.Open strSQL3, objCon


If objRec.EOF = true then
Response.Write("<tr><td colspan=3>No reference documents exist for this card.</td></tr>")
End If

If Not objRec.EOF and not objRec.BOF then
ID2 = objRec("ID")
RefDoc = objRec("RefDoc")
RefRev = objRec("RefRev")
RefNotes = objRec("RefNotes")

Do Until objRec.EOF
    Response.Write("<tr><td><a href='do_UMID_EditRefDocs.asp?RefDoc=" & RefDoc & "&Action=Delete&CardNo=" & CardNo & "'><img src='images/delete.gif' alt='Delete' border='0'></a>")
    Response.Write("&nbsp&nbsp<a href='UMID_RefDocs.asp?CardNo=" & CardNo & "&RefDoc=" & RefDoc & "&Action=Edit'><img src='images/edit.gif' alt='Edit' border='0'></a>&nbsp&nbsp" & RefDoc & "&nbsp</td>")
    Response.Write("<td>" & RefRev & "&nbsp</td>")
    Response.Write("<td>" & RefNotes & "&nbsp</td></tr>")
     
    objRec.MoveNext
Loop

End If
objRec.Close
objCon.Close
Set objRec = Nothing
Set objCon = Nothing



I've used this same pattern in other pages: Define the SQL string, open the recordset, write the table row for the current record, MoveNext, Loop, close the connection. But this time, for the given recordset I'm looking at, there are two records; I only get the first one repeated twice.

Any ideas?
----------------------------------
I'm not a programmer by trade, so please don't beat me unmerciful.

AnswerRe: MoveNext is not moving next!! Pin
Luc Pattyn6-Apr-11 13:57
sitebuilderLuc Pattyn6-Apr-11 13:57 
AnswerRe: MoveNext is not moving next!! Pin
ktrrzn6-Apr-11 13:58
ktrrzn6-Apr-11 13:58 
AnswerRe: MoveNext is not moving next!! Pin
C#Coudou6-Apr-11 17:00
C#Coudou6-Apr-11 17:00 
AnswerRe: MoveNext is not moving next!! Pin
HaBiX6-Apr-11 21:49
HaBiX6-Apr-11 21:49 
GeneralRe: MoveNext is not moving next!! Pin
Bomb_shell7-Apr-11 8:05
Bomb_shell7-Apr-11 8:05 
Questionhow to use reusuable control in ajax tab control? Pin
Dhyanga6-Apr-11 4:38
Dhyanga6-Apr-11 4:38 
AnswerRe: how to use reusuable control in ajax tab control? Pin
Ali Al Omairi(Abu AlHassan)7-Apr-11 11:00
professionalAli Al Omairi(Abu AlHassan)7-Apr-11 11:00 
GeneralRe: how to use reusuable control in ajax tab control? Pin
Dhyanga12-Apr-11 5:25
Dhyanga12-Apr-11 5:25 
GeneralRe: how to use reusuable control in ajax tab control? Pin
Ali Al Omairi(Abu AlHassan)12-Apr-11 20:15
professionalAli Al Omairi(Abu AlHassan)12-Apr-11 20:15 
QuestionDownloading files from server. Pin
sarang_k6-Apr-11 2:18
sarang_k6-Apr-11 2:18 
AnswerRe: Downloading files from server. Pin
meeram3956-Apr-11 2:32
meeram3956-Apr-11 2:32 
Questionimage filepath name not stored Pin
kannan 26-Apr-11 1:34
kannan 26-Apr-11 1:34 
AnswerRe: image filepath name not stored Pin
Pete O'Hanlon6-Apr-11 2:12
mvePete O'Hanlon6-Apr-11 2:12 
AnswerRe: image filepath name not stored Pin
dpkchhirang6-Apr-11 2:20
dpkchhirang6-Apr-11 2:20 
QuestionGoogle map with multiple markers Pin
venu6565-Apr-11 21:21
venu6565-Apr-11 21:21 
AnswerRe: Google map with multiple markers Pin
De_Novice8-Apr-11 11:32
De_Novice8-Apr-11 11:32 
QuestionWill you please post some code. Pin
Sheikh Sajid Ali5-Apr-11 20:20
Sheikh Sajid Ali5-Apr-11 20:20 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.