% ' Dimension Variables Dim dbFile Dim cnString Dim strSql ' Establish Database Connection Set cn = Server.CreateObject ("ADODB.Connection") cnString = "DRIVER={Microsoft Access Driver (*.mdb)};DBQ=" & Server.MapPath("dbUnik.mdb") cn.Open cnString ' Select Statement strSql = "SELECT * FROM tblNews WHERE NewsNumber=1" Set rs = Server.CreateObject ("ADODB.Recordset") rs.Open strSql, cn ' Close connection 'cn.Close 'Set cn = Nothing %>
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
|
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
|||
![]() |
||||||||
![]() |
![]() |
![]() |
![]() |
|||||
![]() |
![]() |
![]() |
![]() |
|||||
![]() |
![]() |
![]() |
||||||
![]() |
![]() |
<%=UCase(rs("NewsHeadline"))%> |
<%=rs("NewsMessage")%> |