|
D:\\Program Files (x86)\\HP\\LoadRunner\\include/Ptt_Mysql.h(126): 错误: C 解释器运行时错误: D:\\Program Files (x86)\\HP\\LoadRunner\\include/Ptt_Mysql.h (126): Error -- memory violation : Exception ACCESS_VIOLATION received。
脚本:
Action()
{
char chQuery[1024];
int status;
MYSQL *Mconn;
lr_load_dll("libmysql.dll");
Mconn = lr_mysql_connect(MYSQLSERVER, MYSQLUSERNAME, MYSQLPASSWORD, MYSQLDB, atoi(MYSQLPORT));
lr_rendezvous("mysql_139");
lr_start_transaction("mysql_139");
sprintf(chQuery, "INSERT INTO test.news (`user_id`,`filiale_id`);");
status = lr_mysql_query(Mconn, chQuery);
if(status!=0){
lr_end_transaction("mysql_139",LR_FAIL );
}else{
lr_end_transaction("mysql_139", LR_PASS);
}
lr_mysql_disconnect(Mconn);
return 0;
}
有没有人知道这是怎么回事啊?是脚本写的有问题吗? |
|