Results 1 to 4 of 4

Thread: ASP Newbie

  1. #1
    Join Date
    Oct 2003
    Posts
    58

    Question Unanswered: ASP Newbie

    Hello all,

    Ok, i have now finally got my connection to my server..... how can i display the records from thetable?

    The code below is as far as i have got , how can i display one of the fields in the table. for example "Cand_First_Name"?

    Thankyou.

    JNR



    <%@LANGUAGE="VBSCRIPT"%>
    <!--#include file="../Connections/audit.asp" -->
    <%
    Dim Recordset1
    Dim Recordset1_numRows

    Set Recordset1 = Server.CreateObject("ADODB.Recordset")
    Recordset1.ActiveConnection = MM_audit_STRING
    Recordset1.Source = "SELECT * FROM dbo.Adv_Candidates_AUD"
    Recordset1.CursorType = 0
    Recordset1.CursorLocation = 2
    Recordset1.LockType = 1
    Recordset1.Open()

    Recordset1_numRows = 0
    %>

    <body>
    hello
    <% %>

    </body>
    <%
    Recordset1.Close()
    Set Recordset1 = Nothing
    %>

  2. #2
    Join Date
    Jul 2003
    Location
    SoCal
    Posts
    721
    Google is a wonderful thing:
    http://www.google.com/search?hl=en&l...cordset+object
    Code:
    If NOT Recordset_1.BOF AND NOT Recordset_1.EOF Then
      While NOT Recordset_1.EOF
        Response.Write Recordset_1("Cand_First_Name") & "<BR>"
        Recordset_1.MoveNext
      WEnd
    Else
      Response.Write "No Records Found" 
    End If
    That which does not kill me postpones the inevitable.

  3. #3
    Join Date
    Dec 2003
    Posts
    454
    Here is the reference book:

    Beginning ASP Databases, by John Kauffman, Wrox

  4. #4
    Join Date
    Oct 2003
    Posts
    58

    Talking Thankyou

    I know it must be a pain... but people have got to start somewhere!

    Thankyou again.

Posting Permissions

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