Cant read data from table? I dont know why?
I am developing a website which includes daily news page. I have added a "read more" link after the news summary. It opens a new page with an address like that :
"http://domainname.com/news/news_detail.asp?newsID=12"
12 may vary depending on the newsID on the data table.
After that I am adding the codes of news_detail.asp file: Here you are:
<% @ Language=VBScript %>
<% Option Explicit %>
<%
Dim ... ' Assigning required variables...
Set adoCon = Server.CreateObject("Adodb.Connection")
adoCon.open = "Provider=Microsoft.Jet.Oledb.4.0;Data Source="& Server.MapPath("../../db_.mdb") &";"
Set rs = Server.CreateObject("Adodb.Recordset")
rs.Open "SELECT * FROM tblNews WHERE newsID = "& CInt(strNewsID) &"", adoCon, 1, 3
strnews = Trim(Request.QueryString("newsID"))
'// reading news info.
intcontentID = rs("newsID")
strContent = rs("news")
dtmnewsDate = kd("newsdate")
strnewsHead = kd("newshead")
strnewsImg = kd("image")
kd.Close
%>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title><%=strnewsHead%></title>
</head>
<body>
<table width="556" height="513" border="2" align="left" cellpadding="2" cellspacing="0" bordercolor="#FFFFCC" class="tabloGolgeli">
<tr><td height="50"><div align="center">nbsp;<%=formatMyDate(dtmnewsDate,0)%> ]<%=strnewsHead%></div></td>
</tr>
<tr>
<td width="556" height="463" align="left" valign="top"><img src="<%=Trim(strnewsImage)%>" alt="<%=strnewsHead%>" border="1" vspace="2" hspace="2" align="left" style="max-height:200px" /> <%=strContent%> </td>
</tr>
</table>
</body>
</html>
Page opens very well. But there is no text. I see that this code cannot read data from table into page. I do not know how I can fix it. So, that is why I am here: I NEED UR HELP.
Email Removed By Mod

