|
ÎÒ×öÁËÒ»¸öSQLµÄÐÔÄܲâÊÔ.ÓÃJAVAдµÄ. WINDOW XP ,SQL SERVER 2000
µ«ÊÇÔÚÔËÐлúÁË:5:20ÃëµÄʱºò,·¢ÏÖÊÂÎñÊýʧ°ÜµÄÌ«¶àÁË.ÎҲ鿴ÁË´íÎóÈÕÖ¾.·¢ÏÖÁË ´íÎóÊÇÕâÑùµÄ:
error -1799 system.err java.sql.sqlexception [Microsoft][sql server 2000 driver for JDBC ] error establishing socket
´ÓÉÏÃæµÄ´íÎóÐÅÏ¢¿ÉÒԲ鿴³ö,ÊÇÔÚ×¢²áSQLÇý¶¯Ê±Ê§°ÜÁË. µ«ÎÒÓֲ鿴ÁËϵ±Ê±µÄ
Ó²¼þÇé¿ö(CPU ,MEM,HARDDISK)¶¼ÊÇÕý³£µÄ,
ÍøÂç:ÎÒÊÇÔÚ±¾»ú×öµÄѹÁ¦²âÊÔ
µ«ÊǾÍÊÇ×¢²áÊý¾Ý¿âÇý¶¯Ê±Ê§°ÜÁË... ²»ÖªµÀΪʲô?
JAVA ´úÂëΪÏÂÃæËùʾ:
/*
* LoadRunner Java script. (Build: 873)
*
* Script Description:
*
*/
import lrapi.lr;
//import java.sql.*;
import com.sql.TestJDBC;
import java.io.*;
public class Actions
{
public int init() throws Throwable {
return 0;
}//end of init
public int action() throws Throwable {
String user = "sa" ;
String password = "sa" ;
String sel = "select * from student where id > 950" ;
//String sel = "select * from student" ;
TestJDBC.main(user,password ,sel);
return 0;
}//end of action
public int end() throws Throwable {
return 0;
}//end of end
}
[ ±¾Ìû×îºóÓÉ superfang ÓÚ 2008-7-27 01:49 ±à¼ ] |
|