When I was using ASP With Access Database, I was using the following codes for connection with the Access Database which resides in the inetpub/wwwroot folder.
Expand|Select|Wrap|Line Numbers
- <%
- 'declare variables
- dim conn, rs, x
- 'set connection to database
- set conn=Server.CreateObject("ADODB.Connection")
- conn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source="& Server.MapPath("../yeshti.mdb")
- 'create recordset
- set rs=Server.CreateObject("ADODB.Recordset")
- rs.Open "SELECT serial,make,model,eng_cap from toyota WHERE active='Y' ORDER BY Serial", conn
- %>
I have used the Data Transformation Service Import/Export Wizard to import the data from MS Access to MS SQL Server.
I have put login and password for user authentication at the ASP program level. I do not want to put any restriction at the server level.
Could any one please help me connect to the SQL Server and display the information found in the table I have chosen.