How use the insert query using parameters?

前端 未结 5 2019
猫巷女王i
猫巷女王i 2020-12-19 15:42

When i try with this query i get an error says that Perameter email doesn\'t exist, i am sure that the variables : email, login_pass, payment_method,operateur are valid and

5条回答
  •  醉话见心
    2020-12-19 16:29

    From the TSQLQuery.ExecSQL documentation:

    ExecDirect indicates that the query does not need to be prepared before it is executed. This parameter can be set to true if the query does not include any parameters.

    So if the code uses

    SQLQuery2.ExecSQL(true);
    

    this means that there will be no support for parameters.

    But because you use parameters, just use

    SQLQuery2.ExecSQL;
    

    and also remove the quotes around parameters.

提交回复
热议问题