record set problem

Results 1 to 2 of 2

Thread: record set problem

  1. #1
    suresh jeyakumar Guest

    Default record set problem

    whenever i use the recordset to get the results of an SQL server<BR>select i am able to get only one record even when there are lots of records when i do a move next my eof is set there any settings which i have to make can somebody get me a checklist that these are the items to be set and what is the cursor type,location to be used (i am just going to display the details got from recorset )i will be thankful for help on this<BR>

  2. #2
    Sharique syed Guest

    Default RE: record set problem

    Lets Say u want to display all usernames in a table then.<BR>Your statement (Select username from tablename)<BR><BR>Here is a code pls go through.<BR><BR>&#060;%<BR>Set conn = Server.CreateObject (ADODB.Connection)<BR>&#039then your dsn,uid,pwd.<BR> "","",""<BR><BR>sql = "Select username from tablename"<BR>&#039Then set ur Recordset<BR>Set rs = Conn.Execute (sql)<BR>&#039Then Display (this can be done through do untill and while-wend also)<BR>Do while Nor rs.Eof%&#062;<BR> &#060;%=rs("Col name")%&#062;<BR>&#060;% rs.Movenext<BR>Loop<BR>rs.Close<BR>Set rs = Nothing%&#062;

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts