How to connect to a microsoft sql server if you are using asp?

I am training myself asp programming. we right away wish to ask a codes male can soak up in to his asp codes so which his sql server can be seen upon a net. appreciate you.

One thought on “How to connect to a microsoft sql server if you are using asp?

  1. <%
    dim con, rs
    set con=server.CreateObject("adodb.connection")
    con = "Provider=SQLOLEDB.1;Persist Security Info=False;User ID=sa;Password=sa;Initial Catalog=database name;Data Source=(local)"
    str="select * from pims_event"
    rs.open str, con, 1, 2
    %>

    Even you can learn ASP, SQL Server from http://www.w3schools.com This is very useful site for Beginner…

    Thanks
    Kailash