If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > ASP > ASP Newbie

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 05-13-04, 10:43
130213 130213 is offline
Registered User
 
Join Date: Oct 2003
Posts: 58
Question 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
%>
Reply With Quote
  #2 (permalink)  
Old 05-13-04, 11:04
Seppuku Seppuku is offline
Useless...
 
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.
Reply With Quote
  #3 (permalink)  
Old 05-13-04, 11:11
gyuan gyuan is offline
Registered User
 
Join Date: Dec 2003
Posts: 454
Here is the reference book:

Beginning ASP Databases, by John Kauffman, Wrox
Reply With Quote
  #4 (permalink)  
Old 05-13-04, 11:12
130213 130213 is offline
Registered User
 
Join Date: Oct 2003
Posts: 58
Talking Thankyou

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

Thankyou again.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On