SqlException: 将截断字符串或二进制数据
2006-10-24 12:21
375 查看
转载自:http://blog.csdn.net/prostore/article/details/4205183受益匪浅
接下来将要写一个jsonList.JSP页面来将结果承现给用户Html代码
![](http://ctojxzsycztao.javaeye.com/images/icon_copy.gif)
<%@ page language="java" contentType="text/html;charset=UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>json 返回列表处理</title>
<script language="javascript">
var xmlHttp = false;
try{
xmlHttp = new ActiveXObject("msxml2.XMLHTTP");
}catch(e1){
try{
xmlHttp = new ActiveXObject("microsoft.XMLHTTP");
}catch(e2){
try{
xmlHttp = new XMLHttpRequest();
}catch(e3){
xmlHttp = false;
}
}
}
if(!xmlHttp){
alert("create xmlHttpRequest fail");
}
function jsonListResult(){
xmlHttp.onreadystatechange = function(){
if(xmlHttp.readyState == 4) {
var userList = eval('(' + xmlHttp.responseText + ')');
var user = eval(userList.JSONRESULT);
var result = "<table border=0>";
result += "<tr><td>userId</td><td>userName</td><td>sex</td></tr>";
for(var i=0;i<user.length;i++) {
result += "<tr>";
result += "<td>"+user[i].userId +"</td>";
result += "<td>"+user[i].userName+"</td>";
result += "<td>"+user[i].sex+"</td>";
result += "</tr>";
}
result += "</table>";
document.getElementById('jsonDiv').innerHTML = result;
}
}
xmlHttp.open("POST","jsonlist.action",true);
xmlHttp.send(null);
}
</script>
</head>
<body>
<div id="jsonDiv"></div>
<input type="button" value="show list" onclick="jsonListResult();">
</body>
</html>
[html] view plaincopy<%@ page language="java" contentType="text/html;charset=UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>json 返回列表处理</title>
<script language="javascript">
var xmlHttp = false;
try{
xmlHttp = new ActiveXObject("msxml2.XMLHTTP");
}catch(e1){
try{
xmlHttp = new ActiveXObject("microsoft.XMLHTTP");
}catch(e2){
try{
xmlHttp = new XMLHttpRequest();
}catch(e3){
xmlHttp = false;
}
}
}
if(!xmlHttp){
alert("create xmlHttpRequest fail");
}
function jsonListResult(){
xmlHttp.onreadystatechange = function(){
if(xmlHttp.readyState == 4) {
var userList = eval('(' + xmlHttp.responseText + ')');
var user = eval(userList.JSONRESULT);
var result = "<table border=0>";
result += "<tr><td>userId</td><td>userName</td><td>sex</td></tr>";
for(var i=0;i<user.length;i++) {
result += "<tr>";
result += "<td>"+user[i].userId +"</td>";
result += "<td>"+user[i].userName+"</td>";
result += "<td>"+user[i].sex+"</td>";
result += "</tr>";
}
result += "</table>";
document.getElementById('jsonDiv').innerHTML = result;
}
}
xmlHttp.open("POST","jsonlist.action",true);
xmlHttp.send(null);
}
</script>
</head>
<body>
<div id="jsonDiv"></div>
<input type="button" value="show list" onclick="jsonListResult();">
</body>
</html>
转自:http://ctojxzsycztao.javaeye.com/blog/390949
接下来将要写一个jsonList.JSP页面来将结果承现给用户Html代码
![](http://ctojxzsycztao.javaeye.com/images/icon_copy.gif)
<%@ page language="java" contentType="text/html;charset=UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>json 返回列表处理</title>
<script language="javascript">
var xmlHttp = false;
try{
xmlHttp = new ActiveXObject("msxml2.XMLHTTP");
}catch(e1){
try{
xmlHttp = new ActiveXObject("microsoft.XMLHTTP");
}catch(e2){
try{
xmlHttp = new XMLHttpRequest();
}catch(e3){
xmlHttp = false;
}
}
}
if(!xmlHttp){
alert("create xmlHttpRequest fail");
}
function jsonListResult(){
xmlHttp.onreadystatechange = function(){
if(xmlHttp.readyState == 4) {
var userList = eval('(' + xmlHttp.responseText + ')');
var user = eval(userList.JSONRESULT);
var result = "<table border=0>";
result += "<tr><td>userId</td><td>userName</td><td>sex</td></tr>";
for(var i=0;i<user.length;i++) {
result += "<tr>";
result += "<td>"+user[i].userId +"</td>";
result += "<td>"+user[i].userName+"</td>";
result += "<td>"+user[i].sex+"</td>";
result += "</tr>";
}
result += "</table>";
document.getElementById('jsonDiv').innerHTML = result;
}
}
xmlHttp.open("POST","jsonlist.action",true);
xmlHttp.send(null);
}
</script>
</head>
<body>
<div id="jsonDiv"></div>
<input type="button" value="show list" onclick="jsonListResult();">
</body>
</html>
[html] view plaincopy<%@ page language="java" contentType="text/html;charset=UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>json 返回列表处理</title>
<script language="javascript">
var xmlHttp = false;
try{
xmlHttp = new ActiveXObject("msxml2.XMLHTTP");
}catch(e1){
try{
xmlHttp = new ActiveXObject("microsoft.XMLHTTP");
}catch(e2){
try{
xmlHttp = new XMLHttpRequest();
}catch(e3){
xmlHttp = false;
}
}
}
if(!xmlHttp){
alert("create xmlHttpRequest fail");
}
function jsonListResult(){
xmlHttp.onreadystatechange = function(){
if(xmlHttp.readyState == 4) {
var userList = eval('(' + xmlHttp.responseText + ')');
var user = eval(userList.JSONRESULT);
var result = "<table border=0>";
result += "<tr><td>userId</td><td>userName</td><td>sex</td></tr>";
for(var i=0;i<user.length;i++) {
result += "<tr>";
result += "<td>"+user[i].userId +"</td>";
result += "<td>"+user[i].userName+"</td>";
result += "<td>"+user[i].sex+"</td>";
result += "</tr>";
}
result += "</table>";
document.getElementById('jsonDiv').innerHTML = result;
}
}
xmlHttp.open("POST","jsonlist.action",true);
xmlHttp.send(null);
}
</script>
</head>
<body>
<div id="jsonDiv"></div>
<input type="button" value="show list" onclick="jsonListResult();">
</body>
</html>
转自:http://ctojxzsycztao.javaeye.com/blog/390949
相关文章推荐
- SqlException:“将截断字符串或二进制数据”
- SqlException: 将截断字符串或二进制数据
- SqlException (0x80131904): 将截断字符串或二进制数据。
- 关于错误“将截断字符串或二进制数据。 语句已终止”
- System.Data.SqlClient.SqlException: 将截断字符串或二进制数据。语句已终止
- 关于异常SQLServerException: 将截断字符串或二进制数据
- 将截断字符串或二进制数据
- System.Data.SqlClient.SqlException: 将截断字符串或二进制数据。
- 关于错误:将截断字符串或二进制数据
- Sql server提醒8152错误:将截断字符串或二进制数据
- asp.net中遇到这样的异常:System.Data.SqlClient.SqlException: 将截断字符串或二进制数据。语句已终止。
- 将截断字符串或二进制数据 语句终止
- 将截断字符串或二进制数据。
- 出现“将截断字符串或二进制数据。语句已终止。 ”错误
- 将截断字符串或二进制数据。 语句已终止。
- com.microsoft.sqlserver.jdbc.SQLServerException: 将截断字符串或二进制数据
- 将截断字符串或二进制数据。语句已终止
- com.microsoft.sqlserver.jdbc.SQLServerException: 将截断字符串或二进制数据
- 将截断字符串或二进制数据。
- System.Data.SqlClient.SqlException: 将截断字符串或二进制数据