LoadRunner SQL 2008
???????????? ???????[ 2014/10/16 16:18:25 ] ?????????????????? LoadRunner
????1. ???? JDBC ????(sqljdbc4.jar)
????2. ?? run-time setting ?μ? classpath ?? JDBC ????????
1 /*
2 * LoadRunner Java script. (Build: _build_number_)
3 *
4 * Script Description:
5 *
6 */
8 import lrapi.lr;
9 import java.io.*;
10 import java.sql.Connection;
11 import java.sql.DriverManager;
12 import java.sql.ResultSet;
13 import java.sql.ResultSetMetaData;
14 import java.sql.SQLException;
15 import java.sql.Statement;
16 import lrapi.web;
17
18 public class Actions
19 {
20 int sum = 0;
21 int columnCount = 0;
22 String conURL = "jdbc:sqlserver://192.168.1.99:1433;DatabaseName=JingPai110_test_Data";
23 String user = "jingpai2014_99";
24 String password = "jingpai2014_99";
25 Statement stat;
26 ResultSet result;
27 Connection conn;
28
29 public int init() throws Throwable {
30 lr.think_time(5);
31 Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver");
32 System.out.println("???????????...");
33
34 // ?????????
35 lr.think_time(5);
36 conn = DriverManager.getConnection(conURL?? user?? password);
37 lr.think_time(5);
38 stat = conn.createStatement();
39 System.out.println(stat);
40 return 0;
41 }//end of init
??????
???·???
??????????????????
2023/3/23 14:23:39???д?ò??????????
2023/3/22 16:17:39????????????????????Щ??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44???????????????
2021/9/17 15:19:29???·???????·
2021/9/14 15:42:25?????????????
2021/5/28 17:25:47??????APP??????????
2021/5/8 17:01:11