标题: 高手请进,如何使用lr_db_connect来连接sybase iq [打印本页] 作者: wxc_justin 时间: 2012-11-16 15:50 标题: 高手请进,如何使用lr_db_connect来连接sybase iq 小弟,刚接触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);
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