PB开发的应用程序,软件(clost())退出后,状态栏里面,数据库都退出了,但是查一下进程,(dbeng10.exe)确还在,关闭电脑时,提示无法关闭这个进程,只能强制性关闭
请高手指教,感谢
------解决方案--------------------
disconnect 有时也不能正常退出,可以使用 dbstop.exe 关闭
Usage: dbstop [switches] [name]
Switches (use specified lower-case letter, as shown):
-c "keyword=value;..."
supply database connection parameters
-d stop the specified database only
-o <file> log output messages to file
-q do not print messages
-x if there are connections, don't stop
-y if there are connections, don't prompt, stop anyway
------解决方案--------------------
使用 dbstop 实用程序停止数据库服务器 实用程序停止数据库服务器 实用程序停止数据库服务器 实用程序停止数据库服务器
语法 dbstop [ options ]
说明 使用选项,您可以控制是否停止服务器 (即使有活动连接);以及控制是停止服务器还是只停止数据库。
退出代码是零(成功)或非零 (失败)。
选项 说明
server-name 要停止的本地数据库服务器的名称。
-c "keyword=value; …" 连接参数
-d 只停止指定的数据库。
-o filename 将输出消息记录到文件
-q 安静模式蜒不显示消息
-x 如果有活动连接,则不停止数据库服务器
-y 即使有活动连接,也会停止数据库服务器且不给出提示
------解决方案--------------------
呵呵,给出命令还不行,哎
string str_command
str_command="dbstop.exe -y"
run(str_command)
提醒一下楼主还要把dbstop.exe 复制到程序所在文件夹
------解决方案--------------------
C:\Program Files\Sybase\SQL Anywhere 8\win32 //pb9
C:\Program Files\SQL Anywhere 11\Bin32//pb11.5
如果你安装了asa 10 就有dbstop.exe ,搜索一下吧