<% atCode = request("atCode") Set Cmd = Server.CreateObject("ADODB.Command") sql = "" sql = sql&" Select top 1 " sql = sql&" b.ncate, b.nnewsnumb, b.nCateM, b.nTtla, b.nConSel, b.nCon, b.nFnm, b.nSFnm, b.nWindt " sql = sql&" From mysql_wm_article as A " sql = sql&" Inner Join wc_news as B on A.title=B.nTtlA " sql = sql&" Where A.AT_CODE = '"&atCode&"' " With Cmd .ActiveConnection = dbcon .CommandType = adCmdText .CommandText = sql .Execute lngRecs, , adExecuteNoRecords End With Set rs = Server.CreateObject("ADODB.RecordSet") rs.CursorLocation = adUseClient rs.Open Cmd, , adOpenStatic, adLockReadOnly if not rs.eof then GetData = rs.GetRows() rs_Count =rs.recordCount-1 ncate = GetData(0,0) nnewsnumb = GetData(1,0) nCateM = GetData(2,0) nTtla = GetData(3,0) nConSel = GetData(4,0) nCon = GetData(5,0) nFnm = GetData(6,0) nSFnm = GetData(7,0) nWindt = GetData(8,0) else GetData = "" rs_Count = "" ncate = "" nnewsnumb = "" nCateM = "" nTtla = "" nConSel = "" nCon = "" nFnm = "" nSFnm = "" nWindt = "" End If Set rs = Nothing Set Cmd = Nothing response.Redirect("/client/news/viw.asp?cate="&ncate&"&mcate="&nCateM&"&nNewsNumb="&nnewsnumb&"") %>