|
小弟,刚接触loadrunner,属于菜鸟,现在领导安排一个任务,让我要用loadrunner来测试sybase iq的查询语句的速度,根据多方获得的信息现在写了如下代码
Action()
{
int NumRows=0;
int i;
lr_db_connect("ConnectionString=Driver={SYBASE ASE ODBC Driver};Server=192.168.11.161;Srvr=fk;Uid=informatic_wxcwd=T2#bJ&8h3P9%G;
"ConnectionName=db1",
"ConnectionType=ODBC",
LAST);
lr_start_transaction("SQL");
NumRows = lr_db_executeSQLStatement("StepName=PerformQuery",
"ConnectionName=db1",
"SQLStatement=SELECT * FROM 'DBA'.'t_czmx_his' where shrq>'2012-11-13' and shrq<'2012-11-14'",
"DatasetName=MyDataset"
LAST);
lr_end_transaction("SQL", LR_AUTO);
lr_output_message("The query returned %d rows.", NumRows);
while(i<NumRows) {
lr_db_getvalue("StepName=GetValue",
"DatasetName=MyDataset",
"Column=USER_NAME",
"Row=next",
"OutParam=MyOutputParam"
LAST);
lr_output_message("The value is: %s", lr_eval_string("{MyOutputParam}") );
i=i+1;
}
lr_db_disconnect("StepName=Disconnect",
"ConnectionName=db1"
LAST);
return 0;
}
运行以后报了以下错误
In file included from c:\documents and settings\administrator\local settings\temp\noname2\\combined_noname2.c:5:
Action.c:35:33: unterminated string or character constant
Action.c:5: possible real start of unterminated constant
还请诸位大侠给点参考意见,能留个QQ那是更好,谢谢 |
|