2
Try:
'UPDATE Tbl_aluno SET nome = '+QuotedStr(edit_nome.text)+'
WHERE PRONTUARIO ='+QuotedStr(.....)
Quotedstr ensures that the parameter is enclosed in quotes, for example: name='AUGUSTO'
2
5
Try:
'UPDATE Tbl_aluno SET nome = '+QuotedStr(edit_nome.text)+'
WHERE PRONTUARIO ='+QuotedStr(.....)
Quotedstr ensures that the parameter is enclosed in quotes, for example: name='AUGUSTO'
2
Error occurred because your query has no quotes in the text fields.
There are a few ways to quote a string in Delphi:
Function Quotedstr('string'):
ShowMessage(QuotedStr('teste'));
Use three single quotes:
ShowMessage('''teste''');
Concatenate with code ASI39
ShowMessage(#39+'teste'+#39);
or
ShowMessage(Chr(39)+'teste'+Chr(39));
Browser other questions tagged sql delphi delphi-7
You are not signed in. Login or sign up in order to post.
Use parameters (Parameters) or treat the quotes in the SQL mount , search by quotedstr
– Motta