%@ Language=VBScript EnableSessionState=False %> <% Option Explicit Dim oConn ' as adodb.Connection Dim oRs ' as ADODB.Recordset Dim oRsCity ' as ADODB.Recordset Dim strClientCity ' as string Dim strSQL ' as string Dim strCity ' as string set oConn = server.createobject("ADODB.Connection") Call oConn.Open("Provider=SQLOledb;Data Source=(local);Initial Catalog=Tryit; Integrated Security=SSPI;") 'Set oRs = Server.CreateObject("Adodb.recordset") 'strSQL = "Select fldCity from tblClientDetail where clname = N'Fred'" 'Call oRs.Open(strsql, oConn, adOpenForwardOnly, adLockReadOnly, adCmdText) 'if not oRs.EOF then ' strClientCity=objRS("fldCity") 'end if 'Call oRs.Close() 'Set oRs = Nothing strClientCity = "Delhi" Set oRsCity = Server.CreateObject("Adodb.recordset") strSQL = "Select name from Cities Order by Name" Call oRsCity.Open(strsql, oConn, adOpenForwardOnly, adLockReadOnly, adCmdText) %>