hur.cn - 华软网

 热门搜索

PB开发的程序在MS Sql Server2000进程信息中的“应用程序”名为何为空?

  作者:未知    来源:网络    更新时间:2019/7/30
如题:PowerBuilder10.0、MS Sql Server2000(环境)
PB环境下直接执行,能够在SQL进程信息中看到应用程序为“PowerBuilder”,编译成EXE执行时,只可看到进程其它信息,然则应用程序名为空.
...
------华软网友回答------
我用PB9+SQL2000,PB开发模式和EXE模式都没显示应用名称~~

进程 ID 环境 ID 用户 数据库 状态 打开事务 命令 应用程序 期待时间 期待类型 期待资源 CPU 物理 IO 内存运用 登录时间 上次批措置惩罚 主机 网络库 网络地址 阻塞者 正在阻塞
9 0 sa master background                     0 TASK MANAGER                                                                                     0 not waiting                                                                                                      0 0 2 2007-3-17 14:00:21 2007-3-17 14:00:21                                                                                                           0 0
8 0 sa master background                     0 TASK MANAGER                                                                                     0 not waiting                                                                                                      0 0 2 2007-3-17 14:00:21 2007-3-17 14:00:21                                                                                                           0 0
7 0 sa no database context sleeping                       0 CHECKPOINT SLEEP                                                                                 54032 not waiting                                                                                                      0 0 0 2007-3-17 14:00:21 2007-3-17 14:00:21                                                                                                           0 0
6 0 system master background                     0 TASK MANAGER                                                                                     2605797 not waiting                                                                                                      0 0 2 2007-3-17 14:00:21 2007-3-17 14:00:21                                                                                                           0 0
54 0 sa bdjs sleeping                       1 AWAITING COMMAND                                                                                 0 not waiting                                                                                                      672 0 0 2007-3-17 14:43:37 2007-3-17 14:43:38                                                                                 Named Pipes  0007E95248CA 0 0
53 0 sa msdb sleeping                       0 AWAITING COMMAND Microsoft(R) Windows(R) Operating System                                        0 not waiting                                                                                                      516 515 132 2007-3-17 14:37:55 2007-3-17 14:37:57 WINXP-SP2                                                                       LPC          0007E95248CA 0 0
52 0 sa master runnable                       2 SELECT INTO      MS SQLEM                                                                        0 not waiting                                                                                                      750 270 0 2007-3-17 14:37:37 2007-3-17 14:43:43 WINXP-SP2                                                                       LPC          0007E95248CA 0 0
51 0 sa bdjs sleeping                       0 AWAITING COMMAND                                                                                 0 not waiting                                                                                                      625 0 0 2007-3-17 14:42:35 2007-3-17 14:42:35                                                                                 Named Pipes  0007E95248CA 0 0
5 0 system master background                     0 TASK MANAGER                                                                                     0 not waiting                                                                                                      0 2 2 2007-3-17 14:00:21 2007-3-17 14:00:21                                                                                                           0 0
4 0 system no database context background                     0 LOCK MONITOR                                                                                     860 not waiting                                                                                                      0 0 12 2007-3-17 14:00:21 2007-3-17 14:00:21                                                                                                           0 0
3 0 system master background                     0 SIGNAL HANDLER                                                                                   0 not waiting                                                                                                      16 0 5 2007-3-17 14:00:21 2007-3-17 14:00:21                                                                                                           0 0
2 0 system no database context sleeping                       0 LOG WRITER                                                                                       1469 not waiting                                                                                                      0 0 0 2007-3-17 14:00:21 2007-3-17 14:00:21                                                                                                           0 0
12 0 sa master background                     0 TASK MANAGER                                                                                     0 not waiting                                                                                                      0 3 2 2007-3-17 14:00:21 2007-3-17 14:00:21                                                                                                           0 0
11 0 sa master background                     0 TASK MANAGER                                                                                     0 not waiting                                                                                                      0 0 2 2007-3-17 14:00:21 2007-3-17 14:00:21                                                                                                           0 0
10 0 sa master background                     0 TASK MANAGER                                                                                     0 not waiting                                                                                                      0 0 2 2007-3-17 14:00:21 2007-3-17 14:00:21                                                                                                           0 0
1 0 system no database context background                     0 LAZY WRITER                                                                                      985 not waiting                                                                                                      0 0 0 2007-3-17 14:00:21 2007-3-17 14:00:21                                                                                                           0 0

------华软网友回复------
上面有点乱~~~~列表太长了,显示不下~~ 不论是PB照旧EXE都只显示了2个应用名

一个是MS SQLEM.另外一个是Microsoft(R) Windows(R) Operating System  

不会显示是PB,更不会显示XXX程序~~
------华软网友回复------
K3和U8能够显示入进程,我想应该是能够的,不过总是不知道在那里设置。
------华软网友回复------
mark
------华软网友回复------
我总算是知道为什么了:

在PB8中运用MSS专用数据接口能够在DBParm中加入AppName='应用程序名'来设置连接到SQL时的应用名称;不过在PB10中的OLEDB中DBParm却没有AppName这个参数了,(我想最大的可能是PB10-OLEDB接口没有提供AppName这个参数)。其它版本的PB在帮助“Database parameters and supported database interfaces”中能够查看详细情况。
------华软网友回复------
终于,问题解决了:
SQLCA.DBMS  = "OLE DB"
SQLCA.AutoCommit = True
SQLCA.dbParm  = "DataLink='db.udl'"
采取OLEDB DataLink方式连接数据库,然后在db.udl资料中“Extended Properties”中如何指定Appname和Host就看你自己了;
db.udl采取INI参数资料结构.
------华软网友回复------
留个脚印
------华软网友回复------
谢谢楼主分享心得
又多学了一招
------华软网友回复------
学了一招
------华软网友回复------
我想了一下,照旧把分给第一个跟进的吧!      
华软声明:本内容来自网络,如有侵犯您版权请来信指出,本站立即删除。