|
The following ASP sample script Code allows you connect to SQL Database
In the code given below the DSN Name is sql123, Database is Shabbier,
Username and Password is Shabbier.
Note : Users are requested to change the above said parameters
with their respective DSN, Username and Password.
<html>
<body>
<%
set con=server.CreateObject("ADODB.connection")
con.Open "dsn=sql123;database=shabbier","shabbier","shabbier"
set rs=server.CreateObject("ADODB.recordset")
rs.Open "select * from sample",con,1,3
while(not rs.EOF)
for i=0 to rs.RecordCount
Response.Write rs(i) & ":"
next
Response.Write "<br>"
rs.MoveNext()
wend
%>
</body>
</html>
|