In the Delphi characters, including single quotes (')

xiaoxiao2021-03-06  54

In Delphi, use the interbase control to access the Interbase database and set the Diagect 3 mode access, the characters referenced in the SQL statement need to be placed in single quotes ('), and implement this operation in Delphi's IBQuery:

Select * from myTable where name = 'zmxjh'

Can do this:

SQL: = 'SELECT * from myTable where name =' '% s''; sql: = format (SQL, ['ZMXJH']);

With two single quotes (''), you can include single quotes in the string.

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

New Post(0)