DELPHI盒子
!实时搜索: 盒子论坛 | 注册用户 | 修改信息 | 退出
检举帖 | 全文检索 | 关闭广告 | 捐赠
技术论坛
 用户名
 密  码
自动登陆(30天有效)
忘了密码
≡技术区≡
DELPHI技术
lazarus/fpc/Free Pascal
移动应用开发
Web应用开发
数据库专区
报表专区
网络通讯
开源项目
论坛精华贴
≡发布区≡
发布代码
发布控件
文档资料
经典工具
≡事务区≡
网站意见
盒子之家
招聘应聘
信息交换
论坛信息
最新加入: hfh9801
今日帖子: 0
在线用户: 4
导航: 论坛 -> 移动应用开发 斑竹:flyers,iamdream  
作者:
男 huangchm (huangchm) ★☆☆☆☆ -
盒子活跃会员
2009/4/26 8:16:13
标题:
Delphi 2007 调试的怪问题,怪,怪,怪!!! 浏览:1399
加入我的收藏
楼主: 最近,用Delphi 2007 for .net 开发一个asp.net项目,这两天在解析xml时,发现在设置断点进行调试时出现以下问题:
1、无法跟踪变量,Watch窗口中的变量值一栏中显示(compiler error): symbol is not linked in executable
2、单步调试时,不是每一行代码都执行,在没有任何条件判断和分支的情况下,有些代码行被条过去了。

请各位帮忙分析分析,是啥原因,谢谢!
----------------------------------------------
-
作者:
男 pcboy0621 (pcboy0621) ★☆☆☆☆ -
普通会员
2009/4/26 9:05:40
1楼: 程式碼貼出來, 哪幾行被跳過 ?
----------------------------------------------
-
作者:
男 huangchm (huangchm) ★☆☆☆☆ -
盒子活跃会员
2009/4/26 15:37:44
2楼: //这是将xml同步到数据库的程序片段
begin
  vData := DataTable.Create;     // 执行   
  try
    strSQL := 'select deptid, deptname, mangeid, deptabbr, deptmemo, status, depttype, syncdate, delflag from sta_department';  // 执行
    vData := dm.ExecuteQuery(strSQL);

    SetLength(PK, 1);
    PK[0] := vData.Columns.Item['deptid']; 
    vData.PrimaryKey := PK;     // 执行   


    rows := vData.Rows;

    // 找出修改和删除的记录
    for I := 0 to rows.Count - 1 do     // 执行   
    begin
      OrgID := rows[i].Item['deptid'].ToString;
      Org := vRemoteOrgan.SelectSingleNode('//org[@OrgID=''' + OrgID + ''']');
          
      strSQL := '';  // 执行
      strTMP := '';  // 执行

      if (Org = nil) then  // 执行
      begin
        strSQL := 'update STA_DEPARTMENT t set t.delflag = ''1'' where t.DeptID = ''' + OrgID + '''';  // 执行
      end else begin
        //如果有字段值不同
        //比较组织名称
        OrgAttr := Org.SelectSingleNode('//OrgName');
        if (OrgAttr.Value = rows[i].Item[1].ToString) then
        begin
          strTMP := 't.DeptName = ''' + OrgAttr.Value + '''';
        end;
        JoinString(strSQL, strTMP);

        //比较组织类型
        OrgAttr := Org.SelectSingleNode('//OrgType');
        if (OrgAttr.Value = rows[i].Item[1].ToString) then
        begin
          strTMP := 't.DeptType = ''' + OrgAttr.Value + '''';
        end;
        JoinString(strSQL, strTMP);
        
        //..... 比较其他字段

        if strSQL <> '' then
        begin
          strSQL := 'update STA_DEPARTMENT t set ' + strSQL + ', t.syncDate = to_char(sysdate, ''yyyymmdd'') where t.DeptID = ''' + OrgID + '''';  // 执行
        end;
      end;
      
      if strSQL <> '' then
        dm.ExecuteNonQuery(strSQL, err);  // 执行
    end;
  finally
    vData.Free;  // 执行
  end;
end;

标有 // 执行 的行是可执行的代码行,其他的行不执行。
----------------------------------------------
-
作者:
男 huangchm (huangchm) ★☆☆☆☆ -
盒子活跃会员
2009/4/28 14:30:44
3楼: 没有人遇到过类似的问题吗?
----------------------------------------------
-
信息
登陆以后才能回复
Copyright © 2CCC.Com 盒子论坛 v3.0.1 版权所有 页面执行80.07813毫秒 RSS