% 'Dimension variables Dim adoCon 'Holds the Database Connection Object Dim rsPageContent 'Holds the recordset for the records in the database Dim strSQL 'Holds the SQL query for the database Dim lngRecordNo 'Holds the record number to be updated 'Read in the record number to be updated lngRecordNo = CLng(Request.QueryString("ID")) 'Create an ADO connection object Set adoCon = Server.CreateObject("ADODB.Connection") 'Set an active connection to the Connection object using a DSN-less connection adoCon.Open "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath("ParentTeacherConf.mdb") 'Set an active connection to the Connection object using DSN connection 'adoCon.Open "DSN=cms" 'Create an ADO recordset object Set rsPageContent = Server.CreateObject("ADODB.Recordset") 'Initialise the strSQL variable with an SQL statement to query the database strSQL = "SELECT * FROM tblParentTeacher, tblTeachers WHERE tblParentTeacher.TeacherName=" & lngRecordNo 'Open the recordset with the SQL query rsPageContent.Open strSQL, adoCon %>