|
-
Nov 26th, 2001, 03:38 PM
#1
Thread Starter
Lively Member
Need a little ASP.NET help
I have just started learning ASP.NET. So far I have not been very successful regarding database work. Every tutorial I have seen wants to push bound recordsets. Up until now, I have used disconnected recordsets almost exclusively. Can you use the old style ADO disconnected recordsets? For example, how would something like
<%@ Language="VBScript" %>
<html>
<body>
<%
sConn = "Provider=SQLOLEDB.1;Persist Security Info=False;User ID=sa;Initial Catalog=northwind;Data Source=(local)"
set rst = Server.CreateObject("ADODB.Recordset")
rst.open "SELECT (lastname + ', ' + firstname) as Empname FROM employees", sConn
while not rst.eof %>
<SELECT id=select1 size=2 name=select1>
<OPTION><% = rst.Fields("empname") %>
</OPTION>
<% rst.movenext
wend
set rst = nothing
%>
</SELECT>
</BODY>
</html>
look like in ASP.NET? Seems like the .NET tutorials use a lot of code to do basic data retrieval that ASP 3.0 did in a few lines of code.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|