帮我看下程序,为什么贴子显示的内容只有250多个字,不能全部显示呀,本来数据库贴子内容长度有5000多个字的。
前台程序如下:
<asp:Repeater id="Repeater1" runat="server"> 
<headerTemplate>
<table boder="0.5" align="center" width="78%"  cellpadding="0" cellspacing="1" >
</headerTemplate>
<ItemTemplate>
<tr>
<td  width="20%" height="10" bgColor="white" ><%# DataBinder.Eval(Container.DataItem,"reply_title") %>
</td>
<td  height="10" bgColor="white" align="right">发帖时间:<%# DataBinder.Eval(Container.DataItem,"reply_data") %>&nbsp &nbsp IP地址:<%# DataBinder.Eval(Container.DataItem,"reply_ip") %>
</td>
</tr>
<tr>
<td  bgColor="#F0F8FF" ><%# DataBinder.Eval(Container.DataItem,"reply_name") %>
</td>
<td  bgColor="#F0F8FF" ><%# DataBinder.Eval(Container.DataItem,"reply_content") %>
</td>
</tr>
</ItemTemplate>
<footerTemplate>
</table>
</footerTemplate>
</asp:Repeater>
后台程序如下:
string strconn = "Provider=Microsoft.Jet.Oledb.4.0;Data Source=" + Server.MapPath(".\\App_Data\\shopbag.mdb");
        conn = new OleDbConnection(strconn);
string strID = Request.QueryString["gid"];
string SqlStr = "select reply_title,reply_content,reply_data,reply_ip,reply_name from [reply] where [reply_titleclass]=" + strID;
        SqlStr += " Union select '',tiezi_content,tiezi_data,tiezi_ip,tiezi_name from [tiezi] where [titleclass]=" + strID;
        SqlStr += " order by [reply_data] ";
        OleDbDataAdapter da;
        OleDbCommand  cmd;
        DataSet ds = new DataSet();
        cmd = new OleDbCommand(SqlStr,conn);
        da = new OleDbDataAdapter(cmd);
        da.Fill(ds,"reply");
        this.Repeater1.DataSource=ds.Tables[0].DefaultView;
        this.Repeater1.DataBind(); 
        conn.Close();帮我看下,如果有好人帮我可以QQ远程帮我看下。我的QQ是78238036
我在线等。你加我好友就行,注明asp.net

解决方案 »

  1.   

    Access数据库是吧???你的这个字段需要设置成备注类型,而不是文本类型,重新调整下字段类型应该就可以了。
      

  2.   

    不要使用Union进行查询,已经解决string SqlStr = "select t1.reply_title,t1.reply_content,t1.reply_data,t1.reply_ip,t1.reply_name,t2.tiezi_content,t2.tiezi_data,t2.tiezi_ip,t2.tiezi_name from reply t1,tiezi t2 where t1.reply_titleclass="+strID+" and t2.titleclass="+trID+" order by t1.reply_data";