多谢指教。作者: Hunter 时间: 2007-11-27 21:19
同样期待ing作者: 风过无息 时间: 2007-11-28 08:51
QTP可以实现DOS下的一些操作,可以实现楼主的功能.,论坛里的.楼主先找找看.作者: Jor 时间: 2007-11-28 08:55
将SQL脚本写成QTP的脚本,做成一个qfl,每次都先运行一下 行么?作者: gp_jl 时间: 2007-12-12 12:36
建议先用VB写个执行sql脚本的函数,命名为 x.vbs,然后再你需要执行这个脚本的用例中加入:
ExecuteFile "e:\x.vbs"作者: caodongjian 时间: 2007-12-12 16:04
楼上的方法.好像可能.以前看过.但没做过作者: joseph_wh 时间: 2007-12-12 17:21
5 楼的方法是最方便的。作者: joseph_wh 时间: 2007-12-12 17:29 Description
Executes the VBScript statements in the specified file. Once the file runs, the definitions (functions, subroutines, classes, etc.) in the file are available from the global scope of the action's script.
Note: You cannot debug a file that is called using an ExecuteFile statement, or any of the functions contained in the file. In addition, when debugging a test that contains an ExecuteFile statement, the execution marker may not be correctly displayed.
Syntax
ExecuteFile File
Example
The following example executes the MyFunction VBS file in order to use the SomeFunction function in the action script.
ExecuteFile "MyFunctions.vbs"
x = SomeFunction ' Defined in MyFunctions.vbs作者: gy21st 时间: 2007-12-12 21:35
Dim oShell
Set oShell = WScript.CreateObject ("WSCript.shell")
oShell.run "sql脚本文件"
Set oShell = Nothing作者: hellen_ma 时间: 2007-12-14 16:15
study作者: danmy 时间: 2007-12-14 16:30
跟你的数据库有关,sqlserver就运行 isql,oracle就运行sqlplus作者: xiaofei0604 时间: 2008-1-13 00:35
学习 学习作者: 暗涧幽火 时间: 2008-1-17 15:36
哦,有没有资料啊?作者: mstiunicon 时间: 2008-1-17 15:43
原帖由 gy21st 于 2007-12-12 21:35 发表
Dim oShell
Set oShell = WScript.CreateObject ("WSCript.shell")
oShell.run "sql脚本文件"
Set oShell = Nothing