标题:[求助]网站数据库ACCESS升到SQL遇到不明错误......
只看楼主
youismyo2
Rank: 1
等 级:新手上路
帖 子:1
专家分:0
注 册:2006-4-30
 问题点数:0 回复次数:1 
[求助]网站数据库ACCESS升到SQL遇到不明错误......

最近公司网站升级数据库,不过ASP也是刚刚上手,本以为小事一件不想麻烦重重:
注:数据是从ACCESS导入SQL的
情况紧急,谢谢大家了[li]
错误一:

错误提示:
阅读次数:

Microsoft VBScript 编译器错误 错误 '800a03f6'

缺少 'End'

/iisHelp/common/500-100.asp,行242

Microsoft VBScript 运行时错误 错误 '800a000d'

类型不匹配: '[string: ""]'

/szsb/news/ShowNews.asp,行86
部分代码:(86行在红色处)
<%
m_ID = Request.Querystring("ID")
m_SQL = "SELECT F_Title,F_Contents,F_Image,F_Addtime,F_Hits,F_CategoryID FROM T_News where F_ID="&m_ID
Set rs = conn.Execute(m_SQL)
If Not rs.Eof then
m_Title = Trim(rs(0))
//temp
if rs("F_CategoryID") = 5 then m_Title = "" + m_Title
if rs("F_CategoryID") = 4 then m_Title = "专业介绍 -> " + m_Title

m_Image = Trim(rs(2))
m_Addtime = Trim(rs(3))
m_Hits = Trim(rs(4))
m_Contents = rTrim(rs(1))
'Hits++
m_SQL = "UPDATE T_News SET F_Hits=F_Hits+1 WHERE F_ID = "& m_ID
conn.Execute (m_SQL)
end if
rs.Close

%>
<HTML>
<HEAD>
<TITLE>
<% = m_Title %>
※<%=site_info(0)%>※</TITLE>
<META http-equiv=Content-Type content="text/html; charset=gb2312">
<META content="MSHTML 6.00.2800.1264" name=GENERATOR>
<link href="../include/style1.css" rel="stylesheet" type="text/css">
<style type="text/css">
<!--
body {
}
.style2 {color: #FFFFFF}
.style3 {font-size: 12px}
.style4 {font-weight: bold}
.style6 {font-size: 9pt; color: #000000; }
.style7 {font-size: 16px}
-->
</style>
</HEAD>
<BODY text=#000000 leftMargin=0 topMargin=0
marginwidth="0" marginheight="0">
<!--#include file="../Include/Top.asp" -->
<TABLE width="760" height=30 border=0 align="center" cellPadding=4 cellSpacing=0 bgcolor="FCAF17">
<TBODY>
<TR>
<TD width="47%" class=nav>您的位置: <A
href="../index.asp">首页 </A>-&gt; 查阅信息-&gt;<a href="<%=request.ServerVariables("HTTP_REFERER")%>" class="p1">[返
回]</a></TD>
<TD width="53%" >
<!--#include file="../Main/IncNewsSearch.asp" -->
</TD>
</TR>
</TBODY>
</TABLE>
<TABLE width="760" border=0 align=center cellPadding=0 cellSpacing=0 bgcolor="#FFFFFF">
<TBODY>
<TR vAlign=top>
<!-- left -->
<TD width="204" bgColor=#F7F7F7>
<!--#include file="../Main/Left.asp" --><br>
</TD>
<TD width="600"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="12" align="left" valign="top"><img src="../Images/job_03.gif" width="563" height="8"></td>
</tr>
</table>
<table width="99%" border=0 align="center" cellpadding=0 cellspacing=1 bgcolor="#CCCCCC">
<tr>
<td width="67%" height="971" valign=top bgcolor="#FFFFFF"><table width="100%" height="971" border=0 cellpadding=0 cellspacing=5>
<tr>
<td height="961" valign=top><table width="98%" border="0" align="right" cellpadding="0" cellspacing="0" bordercolor="#111111" id="AutoNumber15" style="border-collapse: collapse">
<tr>
<th width="84%" height="32" class="style7"><div align="center" class="style7"><span class="style7"><font color=#FF6600><%=m_Title%></font><font color=#FF6600></font></span>
</div></th>
</tr>
<tr>
<th height="7"><hr size="1" color="#CCCCCC"></th>
</tr>
<tr>
<td align="center"> <font color="#666666">阅读次数:<%=m_Hits+1%> 发布于:<%=m_Addtime%></font></td>
</tr>
<tr>
<td height="10">&nbsp;</td>
</tr>
<tr>
<td height="210"><div align="left"><span class="style6">
<%
If not isnull(m_Image) and m_Image<> "" then
Response.write "<a target='_Blank' href='UploadImages/"&m_Image&"'>"
Response.write "<img src='UploadImages/" + m_Image + "' border=0 align='right'>"
Response.Write "</a>"
End if
Response.write m_Contents
%>
//升级后,m_content无法在网页中显示,m_content在数据库为:ntext
内容例:
<P><SPAN class=px20>日前,市劳动和社会保障局公布了10个欠薪举报电话,举报电话将主要受理较严重的群体性欠薪问题的举报。为了鼓励广大群众举报欠薪,市劳动保障部门还制定了举报欠薪奖励暂行办法,对经查证属实的,劳动保障部门将给予举报人适当的奖励。 <BR><BR>10个欠薪举报电话如下: <BR><BR>市劳动保障局25943014 <BR><BR>福田区劳动局82918291 <BR><BR>罗湖区劳动局25438399 <BR><BR>南山区劳动局26665374 <BR><BR>盐田区劳动局2522843125228211 <BR><BR>宝安区劳动局29990000 <BR><BR>龙岗区劳动局28917170 <BR><BR>大工业区管委会84622235 <BR><BR>保税区管理局83590720 </SPAN></P>
有些显示为:<Long Text>,是不是数据导入出了问题啊

搜索更多相关主题的帖子: SQL 数据库 ACCESS 
2006-04-30 09:10
yms123
Rank: 16Rank: 16Rank: 16Rank: 16
等 级:版主
威 望:209
帖 子:12488
专家分:19042
注 册:2004-7-17
得分:0 
CInt(m_Hits)+1
如此写呢?可能因为SQL Server比Access对数据类型要求的更严格,所以字符串与数字不能相加。
2006-04-30 21:19



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-61239-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.417820 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved