Sample scripts - SQL Database connectivity using ASP
 
           
Perl mail script  ASP mail script ASP Hit Counter Script  SQL connectivity  MySQL connectivity

 

The following ASP sample script Code allows you  connect to SQL Database

In the code given below the DSN Name is sql123, Database is test, Username
and Password is test.

Note : Users are requested to change the above said parameters  with their respective DSN, Username and Password.

                              Sample Code
 

<html>

<body>

<%

 set con=server.CreateObject("ADODB.connection")

con.Open "dsn=sql123;database=test","test","test"

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>

 
| Buy domain names | Windows Hosting | Linux Hosting | Email | Acceptable Use Policy |       
Copyright © 2000 - 2005 websuvidha.com. All Rights Reserved.