1,请高人解释一下:
var
  LocateParams:TLocateParams;
begin
 LocateParams:=webdm.dsa_custinfo.LocateParamsList.Add;
 LocateParams.AddParam('custName',FqName);
 LocateParams.AdapterName:=webdm.dsa_custinfo.Name;
 if not webdm.dsa_custinfo.Locate then
   adpQuery.Errors.AddError('找不到'+FqName+'的资料!');
end;每一行的意思,我不明白?它的查询原理是什么?2,我想在页面的grid中使用复选框来选定记录,保存时将选定的记录的修改保存回数据库。这个能实现吗?如何实现?3,在DataSetAdapter1中的加入field 在onGetDisplayText中加入
valeu:='<a href=".......">'+field.Value+'</a>',但怎样使打开的页面中的数据定位到
点击的记录呢?4,DataSetAdapter1中grid的列宽如何控制,我的自己会变。

解决方案 »

  1.   

    5,在AdapterGrid1中添加AdapterCommandColumn1列加入按钮,怎样显示的是图片?如何设置?这个问题可能和2个类似,请指点!1000分奉上。
      

  2.   

    <%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
    <!--#include file="../Connections/MySiteConnection.asp" -->
    <!--#include file="../function.asp" -->
    <html>
    <head>
    <title>
    <%
      '定义链接类型
      if request("Type")=empty then
         ThisType="MyLink"
      else
         ThisType=request("Type")
      end if
      if ThisType="MyLink" then
         TypeStr="常去的老地方"
      else
       TypeStr="临时链接" 
      end if  
      '输出标题
      if ThisType="MyLink" then
         response.Write("常去的老地方")
      else
         response.Write("保存的临时链接")
      end if  
    %>
    </title>
    <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
    <link href="../MySite.css" rel="stylesheet" type="text/css">
    </head>
    <body bgcolor="#3399CC">
    <form name="gb" id="gb">
      <div align="center"><%=TypeStr%>:<a href="AddURL.asp?Type=<%=ThisType%>">添加新的链接</a> 
      </div>
      <p> 
      <table width="90%" border="1" align="center" cellpadding="0" cellspacing="0">
        <tr> 
          <td width="73%"><div align="center">链接名称</div></td>
          <td width="16%"><div align="center">固定顶端</div></td>
          <td width="11%"><div align="center">删除</div></td>
        </tr>
        <%
      '删除URL
      if request("dz")="Del" then
         Lib_DelURL request("DelID")
      end if
      '返回URL集合
      Set rsURL = Lib_ReadURL(ThisType)
      If rsURL Is Nothing Then
         response.Write "读取数据失败!"
     response.End()
      end if
      '显示URL
      while not rsURL.eof 
            response.Write "<tr>"
    response.Write "<td><div align=center>"
    response.Write "<a href="&rsURL("Address")&" target=_blank>"
            response.Write rsURL("LinkName")&"</a>"
    response.Write "</div></td>"
    response.Write "<td><div align=center>"
    'response.Write rsURL("IsTop")
    if rsURL("IsTop")="Yes" then
       response.Write "<input type=checkbox value=固定 id=IsTop"&rsURL("ID")&" onClick=""window.open('ChangeIsTop.asp?to=Not&id="&rsURL("ID")&"','改变固定顶端','width=10,height=10')"" checked>"
    else
       response.Write "<input type=checkbox value=不固定 id=IsTop"&rsURL("ID")&" onClick=""window.open('ChangeIsTop.asp?to=Yes&id="&rsURL("ID")&"','改变固定顶端','width=10,height=10')"">"
    end if   
    response.Write "</div></td><td><div align=center>"
    response.Write "<a href=ShowMyLink.asp?DelID="&rsURL("ID")&"&Type="&ThisType&"&dz=Del>删除</a>"
    response.Write "</div></td></tr>"

            rsURL.movenext
      wend
    %>
        <tr> 
          <td colspan="3"><div align="center"><a href="#a" OnClick="location.reload();">手动刷新</a> 
              自动刷新 
              <input name="rload" type="checkbox" id="rload" value="auto"  alt="选中将不会每次修改自动刷新" checked>
            </div>
            <div align="center"></div></td>
        </tr>
      </table>
    </form>
    </body> 
    </html>
    ChangeIsTop.asp<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
    <!--#include file="../Connections/MySiteConnection.asp" -->
    <!--#include file="../function.asp" -->
    <%
      ChangeTo =request("to")
      ID       =request("ID")
      'response.Write ChangeTo&ID
      Lib_ChangeIsTop ID,ChangeTo
    %>
    <script language="JavaScript">
      if(window.opener.gb.rload.checked)
           window.opener.location.reload();  
      close();
    </script>
    <html>
    <head>
    <title>改变</title>
    <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
    </head>
    <body bgcolor="#3399CC"></body>
    </html>
      

  3.   

    1,请高人解释一下:
    var
      LocateParams:TLocateParams;
    begin
     LocateParams:=webdm.dsa_custinfo.LocateParamsList.Add;//Add 方法创建并添加一个TLocateParams 实例
     LocateParams.AddParam('custName',FqName);//定位到 custName字段值为 FqName 的记录
     LocateParams.AdapterName:=webdm.dsa_custinfo.Name;//从webdm.dsa_custinfo相联的数据表中定位
     if not webdm.dsa_custinfo.Locate then//开始定位
       adpQuery.Errors.AddError('找不到'+FqName+'的资料!');//添加一个错误信息,在Script 中可用 Adapter.Errors 枚举对象读出
    end;
      

  4.   

    2.当然可以。
     在 Adapter 中添加一个 AdapterBooleanField 字段,将它添加到你的 Grid 中,其InputType 属性置为 iftCheckBox。当提交时,检查此字段值
      

  5.   

    3。
    <a href="url?ID=XXX">
    在页模块的 BeforeDispatch 事件中,用 WebContext.Request.QueryFields.Values['ID']取得此 ID 值,然后用上述的 Locate 方法定位记录
      

  6.   

    谢谢hiflower(花)的回答,公司这几天网不好,没有及时的来这里。这的太谢谢你了,我马上试一试。会立即开贴加分
      

  7.   

    to hiflower(花)
     
    页面中的adaptergrid已经连接到一个datasetadapter,如何在连接adapter呢?还有第五个问题,如何解决?谢谢,意思意思,请笑纳
      

  8.   

    不需要添加 adapter,就在你的 datasetadapter 中添加 AdapterBooleanField,将这个字段添加到你的 adaptergrid 中,并在 AdapterBooleanField 的OnGetValue 中为此字段赋值5。设置该按钮的 ImageProducer 属性
      

  9.   

    to hiflower(花) 请到接一点儿分吧,不然我不好意思再问你了。http://expert.csdn.net/Expert/topic/1896/1896616.xml?temp=.3640558ImageProducer值的格式是什么?谢谢!
      

  10.   

    我在adaptergrid中设置adaptermode为browse,按照您的做法,但是我没有找到InputType 属性?请指教。
      

  11.   

    我没说清楚,是把字段 AdapterBooleanField 添加到 adaptergrid 中后,选中这个字段,修改它的 InputType 属性
      

  12.   

    我还是没有找到啊,我用的delphi7。就剩下第2 和第5 个问题了。请大家继续关注啊。to  hiflower(花) 500分入帐了,谢谢您。请继续帮我啊。如果方便发个有这些问题解决的源码给我吧  [email protected]
      

  13.   

    选中 adaptergrid,在右边窗格中点右键,选 new component,再选 Adapter Edit Column,点OK
    选中新添加的字段,设置其 FieldName 属性为该 AdapterBooleanField 字段,再设置 InputType 属性,。至于 ImageProducer 属性,我一时想不起来怎么用了。
      

  14.   

    请帮我吧!
    还有:
    在 AdapterBooleanField 的OnGetValue 中的处理代码,我没弄过所以~~你就贴一个例子吧!谢谢
      

  15.   

    很抱歉,ImageProducer 我也帮不上忙。
    因为我不用 AdapterPageProducer ,我只用 PageProducer,然后自己写 Server-side Script。它其实就是 <a href=""..><img .....></a>OnGetValue 中,你只要 Value:=False 或 Value:=True 就行了,因为这只不过给出一个初始值,其最终结果将由 IE 用户选择。
      

  16.   

    我也希望使用pageproducer啊,可惜我不会处理,查帮助也没有啊。delphi7的帮助好像少一些东西啊。ongetvalue中,我想取出数据库中的内容,修改复选框。我想此时的记录应该已经自动定位到此记录了。就是不知使用什么语句读出数据来?你给我一个您使用pageproducer处理数据的复杂一些的页面吧。我照着学习一下吧!这样说来说去我都~~太笨了。谢谢!问题解决一定让你升成星星。
    [email protected]在线等待~
      

  17.   

    这和 IE 的设置有关。
    点 IE 的 工具|Internet 选项,在 “Internet 临时文件”部分点“设置”按钮,选中“每次访问此页时检查”
      

  18.   

    出现如下错误是什么原因呢?Internal Application Error
    Access violation at address 004908D9 in module 'P_webcust.exe'. Read of address 00000000 --------------------------------------------------------------------------------
    /P_webcust.adcust/relation
      

  19.   

    这是个接口错,很多原因都会导致的。
    比如,上回我在结果集里用了lookup字段,但lookup 的那个key字段为空,就报这样的错。当然,你也问题也可能是其它原因导制的,你最好仔细查查。
      我是用AdapterPageProducer,自已写服务器端脚本调用各Adapter, 
      我也有个问题PageProducer如何调用Adapter呢?我试了,把PageProducer换成AdapterPageProducer,好象不行啊
      

  20.   

    to hiflower(花) owl_927(狎鸥客)共同交流学习吧!难得遇上使用同样技术的。
    我都郁闷了几个礼拜了,我还要研究文字图形混排,没做过就是菜啊。我得qq:84533116
      

  21.   

    呵呵,好啊,我最近在调研WebSnap+MIDAS 的全套解决方案,也挺郁闷。
      

  22.   

    我也在用websnap做网页的后台程序,但不用它手动生成HTML,而是用引用HTML文件的方式,这样好不好.