Lets start how we can connect to the database and pull the records from a Table using Classic ASP.
Yes, we all know people stopped using Classic ASP for long time but, still there are some website running in Classic ASP which need some modifications right?
No worries, here is the entire script for you enjoy!
Set conn = Server.CreateObject("ADODB.Connection")
'User (local) or localhost or your host ip
conn.Open "Provider=SQLOLEDB; Data Source = (local); Initial Catalog = mydatabase; User Id = myusername; Password=mypassword"
strSQL = "select * from table_name"
Set rst = conn.Execute(strSQL)
If rst.BOF And rst.EOF Then
' No data
Do While (Not rst.EOF)
Response.Write "<tr><td>" & rst("columnname1") & "</td><td>" & rst("columnname2") & "</td></tr>"