Use of parameters in the SQL statement

zhaozj2021-02-16  62

example:

VAR

P_1: tdatetime;

Dtm_1.ADOQ_1.SQL.Add ( 'Update record_use set Department_Provide =' '' '' ComboBox1.Text '' '' ', DateTime_Provide =: P_1 where No_Tickets between' Inttostr (n) 'and' Inttostr (m));

DTM_1.adoq_1.Parameters.Parambyname ('p_1'). Value: = now;

The use of parameters in the SQL statement can solve the entry of data for different data types in the database.

转载请注明原文地址:https://www.9cbs.com/read-17782.html

New Post(0)