Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Set of ASP Questions from a NEWBIE
Message
From
14/12/2000 10:00:13
 
 
To
14/12/2000 01:56:59
General information
Forum:
Internet
Category:
Active Server Page
Miscellaneous
Thread ID:
00453240
Message ID:
00453327
Views:
35
>How can you:
>
>1) Return a recordset/rowset from a SQL Server and determine how many records there are.
>

Do you know how to do it in VB ? Same thing.

'Create object. In this case Connection to a database
Set Conn = Server.CreateObject("ADODB.Connection")

Conn.ConnectionString = "Place here your connection string"
'Open the connection
Conn.Open

'Create recordset
Set Rs = Server.CreateObject("ADODB.Recordset")
'Open recordset with the connection which we have created earlier
Rs.Open "SELECT * from users", Conn, 1,3

'Loop thru records
do while not rs.EOF
Response.Write rs("name") & "
" ' if it's = name then delete, as you know
is an HTML tag for line break
rs.MoveNext ' Movenext
loop

'Deinitialize the Connection and Recordset
set Rs = nothing
set Conn = nothing





>2) Create procedures and functions.
>

You put your function at the top of the page
Function MySub

End Function


>Does ASP have an equivalent VB EXIT SUB/FUNCTION OR END Statement???

Response.end
Guy Barrette, MCSD
============
Blog http://weblogs.asp.net/guybarrette
Microsoft Regional Director, Montreal, Canada www.microsoft.com/rd
MVP, ASP.NET http://mvp.support.microsoft.com/
President, Montreal Visual Studio User Group www.guvsm.net
INETA Regional Rep for Quebec www.ineta.org
UniversalThread Magazine Columnist (.NET Books Review Column) www.utmag.com
Tech Chair French Track, DevTeach 2004 & 2005 www.devteach.com
Business Architect, Microsoft Team - Nurun Inc www.nurun.com
XBox Live Gamer Tag: Slomo QC CA
Previous
Reply
Map
View

Click here to load this message in the networking platform