ASP Sql Select Tutorial MS SQL Server MS Access
In this ASP tutorial, we will select users table from MS SQL Server and MS Access using asp code sample below.
ASP SQL Select Code
<%
DIM myCon
Set myCon = Server.CreateObject("ADODB.Connection")
myCon.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=mydb.mdb;"
myCon.Open
DIM strSQL
strSQL = "SELECT * FROM tbl_users"
DIM mySet
Set mySet = Server.CreateObject("ADODB.Recordset")
mySet.Open strSQL, myCon
%>
Note that this asp sql select is for MS ACCESS. For MS SQL Server use the following connection string.
MS SQL Server Connection String
Provider=sqloledb;Data Source=SqlServerIPAddress;Initial Catalog=DataBaseName;User Id=UserName;Password=UserPassword;