|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
SlickEdit: Code in over 40 languages across 7 platforms. SlickEdit’s unmatched power, speed, and flexibility allows even the most accomplished developers to write better code faster. Download a free trial today! |
|
#1
|
|||
|
|||
|
Database - General - HELP Need URGENTLY
hi ,
i am using sql server 2000 database for my asp websites. here , i have displayed some of the datas from database. for example name of the book , auther, descriptions ,etc.. My website was working properly but from two days back ,it doesnot work properly. the problem of my site ,it shows half of the datas only from the database. for example half name of book ,half name of auther , single line of descriptions like that. we have own server for our websites , so i have restarted the server, restarted the sql server and check it out the codings but i cant sove this problem .... pls help me very urgent and thanks in advance...... |
|
#2
|
||||
|
||||
|
Hi,
Can you give us a little bit more info, are you getting any errors? Can you post the code that is giving you a problem? Any chance you could upload a screenshot showing the errorneous page? |
|
#3
|
|||
|
|||
|
Quote:
the actual title is : the leader : achievements and accomblishements. and descriptions is around 25 lines. but the output is below : Title : The Leader: Achievements and A ![]() Publication ID: 1125 Author: ODPMIA Languages: Arabic No. of Pages: 100 Add to Order List... descriptions :A new publication by the Cente Add to Order List... |
|
#4
|
||||
|
||||
|
Can you post the bit of code which is producing that output so I can see what is going on.
Has anything changed this code in the last few weeks or has it just stopped working? Or has anything changed in the nature of the data that you are storing - date formats, character sets etc..? |
|
#5
|
|||
|
|||
|
Quote:
PubID=Trim(Request.Querystring("PubID")) SqlQuery="Select PubID,PubNo,PubName,Author,PubDesc,NoPages,Languag es,PubPicture from e_io_PublicationDetails where pubid=" & PubID & " and status=1" set objRs = objConn.Execute(sqlQuery) this is database coding .. and more thing i have added one new content in this page and it was working fine after two days it shows like this.... |
|
#6
|
|||
|
|||
|
Quote:
PubID=Trim(Request.Querystring("PubID")) SqlQuery="Select PubID,PubNo,PubName,Author,PubDesc,NoPages,Languag es,PubPicture from e_io_PublicationDetails where pubid=" & PubID & " and status=1" set objRs = objConn.Execute(sqlQuery) this is database coding .. and more thing i have added one new content in this page and it was working fine after two days it shows like this.... |
|
#7
|
||||
|
||||
|
Hi,
Any chance you can post the code which is physically displaying the data on the screen. You say you have added new content to the page, what changes did you make? It would be helpful to see more of your code. |
|
#8
|
|||
|
|||
|
hi , this is my coding for that. and i am using content management systems for adding new things , so i added new book and info about that book . after added , i have checked . it was working fine but suddenly it was happen ...
Code:
<% @Language=VBScript %>
<% Option Explicit %>
<%
'''''''''''''''''''''''''''''''''''To prevent the page from displaying without a refresh
'no cache - browser
Response.Expires = 0
Response.Expiresabsolute = Now-1
Response.AddHeader "pragma","no-cache"
Response.AddHeader "cache-control","dim"
' no cache - proxy
Response.CacheControl = "no-cache"
response.buffer = true
'''''''''''''''''''''''''''''''''''''''''''''''''' ''''''''''''''''''''''''''''''''''''
%>
<!-- #include file="../Includes/adovbs.inc" -->
<!-- #include file="../Includes/DPMIO_Connect.asp"-->
<!-- #include file="e_io_Order.asp" -->
<%
Dim objRs,SqlQuery,PubID
PubID=Trim(Request.Querystring("PubID"))
SqlQuery="Select PubID,PubNo,PubName,Author,PubDesc,NoPages,Languag es,PubPicture from e_io_PublicationDetails where pubid=" & PubID & " and status=1"
set objRs = objConn.Execute(sqlQuery)
%>
<html dir="ltr">
<head>
<meta http-equiv="Content-Language" content="en-us">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title><%=objRs("PubName")%> - Publications - Office of Deputy Prime Minister for Information Affairs</title>
<link rel="stylesheet" type="text/css" href="e_io_StyleSheet.css">
<script language="JavaScript1.2" src="e_io_Scripts.js"></script>
<style>
p {
font-family: "Arial";
font-size: 12px;
font-style: normal;
line-height: 16 px;
font-weight: normal;
font-variant: normal;
text-transform: none;
color: #000000;
text-decoration: none;
margin : 10px 0px 0px 10px;
direction : ltr;
text-align : justify;
text-justify: kashida;
}
</style>
</head>
<body topmargin="0" leftmargin="0" background="images/e_io_home_bg.gif" onLoad="MM_preloadImages('images/e_io_menu1a.gif', 'images/e_io_menu2a.gif', 'images/e_io_menu3a.gif','images/e_io_menu4a.gif','images/e_io_menu0a.gif','images/e_io_menu6a.gif')">
<DIV id="pagebg"></DIV>
<DIV id="main" align="center">
<!-- #include file="e_io_Header.asp" -->
<DIV id="main2">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td width="130" align="center" valign="top">
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="130" align="center">
<tr>
<td background="images/e_io_home_bg2.gif"><P class="Blank"> </p></td>
</tr>
<tr>
<td background="images/e_io_home_bg2.gif">
<a href="e_ss_index.asp" target="_blank" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image1','','images/e_io_menu1a.gif',1)"><img name="Image1" border="0" src="images/e_io_menu1.gif" width="130" height="30"></a></td>
</tr>
<tr>
<td background="images/e_io_home_bg2.gif">
<a href="e_io_EventsMain.asp" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image6','','images/e_io_menu6a.gif',1)"><img name="Image6" border="0" src="images/e_io_menu6.gif" width="130" height="30"></a></td>
</tr>
<tr>
<td background="images/e_io_home_bg2.gif">
<a href="e_io_News.asp" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image2','','images/e_io_menu2a.gif',1)"><img name="Image2" border="0" src="images/e_io_menu2.gif" width="130" height="30"></a></td>
</tr>
<tr>
<td background="images/e_io_home_bg2.gif">
<a href="e_io_Publications.asp" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image3','','images/e_io_menu3a.gif',1)"><img name="Image3" border="0" src="images/e_io_menu3.gif" width="130" height="30"></a></td>
</tr>
<tr>
<td background="images/e_io_home_bg2.gif">
<a href="e_io_ContactUs.asp" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image4','','images/e_io_menu4a.gif',1)"><img name="Image4" border="0" src="images/e_io_menu4.gif" width="130" height="30"></a></td>
</tr>
<tr>
<td background="images/e_io_home_bg2.gif">
<a href="e_io_index.asp" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image5','','images/e_io_menu0a.gif',1)"><img name="Image5" border="0" src="images/e_io_menu0.gif" width="130" height="30"></a></td>
</tr>
<tr>
<td background="images/e_io_home_bg2.gif"><P class="Blank"> </p></td>
</tr>
<tr>
<td>
<img border="0" src="images/e_io_publication_menu.gif" width="130" height="200">
<%DisplayCart %>
</td>
</tr>
</table>
</td>
<td width="555" bgcolor="#FFFFFF" valign="top" align="center">
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="555">
<tr>
<td width="100%">
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="555">
<tr>
<td width="50%" align="left">
<img border="0" src="images/e_io_corner1.gif" width="17" height="12"></td>
<td width="50%" align="right">
<img border="0" src="images/e_io_corner2.gif" width="17" height="12"></td>
</tr>
</table>
</td>
</tr>
<%
dim temp
temp="http://" & request.servervariables("Http_host") & request.servervariables("url") & "?PubID=" & PubID
%>
<tr>
<td width="100%"><p class ="ContactUs_Para" style="text-align: right">
<a href="javascript:TellFriend('e_EmailFriend.asp?page=<%=temp%>')"><img border="1" src="images/mail.gif"></a>
<a href="e_io_PrintPub.asp?PubID=<%=PubID%>" target="_blank"><img border="1" src="images/print.gif"></a> </p>
<table border="1" cellpadding="5" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="90%" align="center" height="138">
<tr>
<td width="100%" >
<p class="PubTitle"><%=objRS("PubName")%></p>
<p class="PubImg"><img border="1" src="../images/PubImages/<%=objRs("PubPicture")%>" align="right" hspace="10"></p>
<p class="PubData"><font class="PubValue">Publication ID: </font><%=objRS("PubNo")%></p>
<% if objRS("Author") = "ODPMIA" then %>
<p class="PubData"><font class="PubValue">Author: </font>ODPM - Information Affairs</p>
<% else %>
<p class="PubData"><font class="PubValue">Author: </font><%=objRS("Author")%></p>
<% end if %>
<p class="PubData"><font class="PubValue">Languages: </font><%=objRS("Languages")%></p>
<p class="PubData"><font class="PubValue">No. of Pages: </font><%=objRS("NoPages")%></p>
<p><a class="PubAddLink" href="e_io_Order.asp?Action=add&PubNo=<%=objRs("PubNo")%>&quantity=1&PubName=<%=objRs("PubName")%>">Add to Order List...</a></p>
<p><%=objRS("PubDesc")%></p>
<p><a class="PubAddLink" href="e_io_Order.asp?Action=add&PubNo=<%=objRs("PubNo")%>&quantity=1&PubName=<%=objRs("PubName")%>">Add to Order List...</a></p>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
<td width="15px" background="images/e_io_home_bg2.gif">
</tr>
<tr>
<td width="130" align="center" valign="top" height="12"></td>
<td width="555" height="12" bgcolor="#FFFFFF" align="right"><img border="0" src="images/e_io_corner3.gif" width="17" height="12"></td>
<td width="15px" background="images/e_io_home_bg2.gif" height="12"></td>
</tr>
<tr>
<td width="130" align="center" valign="top" height="10"></td>
<td width="555" height="10" background="images/e_io_home_bg2.gif"></td>
<td width="15px" background="images/e_io_home_bg2.gif" height="10"></td>
</tr>
</table>
</DIV>
<!-- #include file="e_io_Footer.asp" -->
</DIV>
</body>
</html>
<%
objRs.Close
Set objRs=Nothing
objConn.Close
Set objConn=Nothing
%>
Last edited by mehere : May 12th, 2008 at 09:26 AM. Reason: added code tags ... please use them in the future when posting code |
|
#9
|
||||
|
||||
|
At a glance I cant see anything obviously wrong.
What was the new book that you added? Is there anything unusal about it? Any unusual characters, bad date format etc..? Do you know the pubid of the record that you added? If so, add that number into the highlighted line. What do you see, does this record correspond with the data in the database? Code:
<!-- #include file="../Includes/adovbs.inc" -->
<!-- #include file="../Includes/DPMIO_Connect.asp"-->
<!-- #include file="e_io_Order.asp" -->
<%
Dim testPubID
testPubID =
Dim objRs,SqlQuery,PubID
PubID=Trim(Request.Querystring("PubID"))
SqlQuery="Select PubID,PubNo,PubName,Author,PubDesc,NoPages,Languag es,PubPicture " & _
"from e_io_PublicationDetails where pubid=" & testPubID & " and status=1"
set objRs = objConn.Execute(sqlQuery)
For Each x in objRS.Fields
Response.Write(x.Name & " - " & x.Value & "<br>")
Next
objRs.Close
Set objRs=Nothing
objConn.Close
Set objConn=Nothing
%>
PS. please try to wrap your code in [code ]..[ /code] tags when posting. |
|
#10
|
|||
|
|||
|
hello br. thanks ur response.. but i tried ur code . that is, i am giving directly the pubID but it shows like old there is no any changes....
|
|
#11
|
||||
|
||||
|
Quote:
OK, thats good. The purpose of the code was to determine whether the problem lies with the frontend - which it apparently doesn't, because a simple test returned the same results. Therefore, the problem seems to lie with either the database or the mechanism which populates the database - the CMS. Can you confirm whether the information held in the database for that record is correct? Also, can you post any of the code which created that record in the database, maybe it isn't handling certain characters correctly? |
![]() |
| Viewing: ASP Free Forums > Programming > ASP Development > Database - General - HELP Need URGENTLY |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|