Copyright © RDSIndia.com,
All Rights Reserved
RDS SUPPORTHOMESERVER BASICSCONFIGURING FTP

RDS SUPPORTCONFIGURING E-MAILSTRANSFERRING DATABASETRANSFER TO RDS SERVERDOMAIN STATISTICSPOST YOUR QUERYSAMPLE SCRIPTS

Sample Scripts - SQL Database Connectivity using ASP

 

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>