求助参数化问题
lr_save_string("{NewParam}","buf");web_custom_request("sqlquery.do_3",
"URL=http://localhost:8080/fluxWmsV3Serv/sqlquery.do?reqvar=query",
"Method=POST",
"Resource=0",
"RecContentType=text/html",
"Referer=",
"Snapshot=t3.inf",
"Mode=HTTP",
"EncType=text/xml; charset=GBK",
"Body=<?xml version=\"1.0\" encoding=\"GBK\"?>\r\n"
"<ROOT-INFUT>\r\n"
" <FUNCTIONNAME>getRecord</FUNCTIONNAME>\r\n"
" <ENCODING>GBK</ENCODING>\r\n"
" <OPERATIONNAME />\r\n"
" <USERID>SAI</USERID>\r\n"
" <LOGIN-LANGUAGE>CN</LOGIN-LANGUAGE>\r\n"
" <DBID>DB</DBID>\r\n"
" <SERVLETNAME>sqlquery</SERVLETNAME>\r\n"
" <METHOD-NAME>query</METHOD-NAME>\r\n"
" <BUSINESS-DATA>\r\n"
"<SQL-ITEM />\r\n"
" </BUSINESS-DATA>\r\n"
" <EXTEND>\r\n"
"<SQL>select A from DBC whereno='{buf}'</SQL>\r\n"
"<SQL-WHERE />\r\n"
"<RETURN-COLUMN-NAMES />\r\n"
"<PAGEINDEX />\r\n"
"<PAGESIZE />\r\n"
"<SQL2 />\r\n"
"<MAINKEY />\r\n"
"<ORDERBYLIST />\r\n"
" </EXTEND>\r\n"
"</ROOT-INFUT>\r\n"
"\r\n",
LAST);
输出:select A from DBC whereno='{NewParam}'
求助怎样才能输入{NewParam} 参数化的值? atoi (lr_output_message(lr_eval_string("{NewParam}"))); lr_output_message("no=%d",atoi(lr_eval_string("{NewParam}"))); 要先转为参数才能这样用 我也有一个类似的问题,
memcpy(megaBody, "0000000000200000000000002350016\0<devID>\0<Message>\r\n<Ticket><ticket></Ticket>\r\n<Naming><devNaming></Naming>\r\n</Message>\r\n", totalLength-16);
这里面的参数化总是失败,存进去的还是<devID> <ticket> <devNaming>,而不是实际的参数值,
楼主你解决了吗?教教我。
页:
[1]