Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how to use JDBC request when parameters have " #6387

Open
DrLuRen opened this issue Dec 10, 2024 · 0 comments
Open

how to use JDBC request when parameters have " #6387

DrLuRen opened this issue Dec 10, 2024 · 0 comments

Comments

@DrLuRen
Copy link

DrLuRen commented Dec 10, 2024

The documentation URL

https://jmeter.apache.org/usermanual/component_reference.html#JDBC_Request

Feedback

I try to make a JDBC request
update user set nickname = ? where id = ?

Parameters is
${nickName},${id}

Beanshell is
String nickname = vars.get("nickname");
log.info("before ===>" + nickname);
nickname = nickname.replaceall("\"","\"\"\"");
log.info("after ===> "+ nickname);
vars.put("nickname",nickname);

but I get a error

before ===> nick"name
after ===> nick"""name
cannot have quote-char in plain filed:[nick"]

the document say

The list must be enclosed in double-quotes if any of the values contain a comma or double-quote, and any embedded double-quotes must be doubled-up, for example:
"Dbl-Quote: "" and Comma: ,"

how to make it work?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant