Delphi update语句修改SQLite数据库表出现 SQLiteException: unrecognized token:的错误原因

一般都是SQL语句引号''''错误:

可参考下面的正确写法:

//参考下面的正确写法 
SQL.Add('update COMM set 学生编号='''+trim(edit1.Text)+''',学生姓名='''+trim(edit2.Text)+''',学生年龄='''+trim(edit3.Text)+''',学生性别='''+trim(edit4.Text)+''',所在大学='''+trim(edit5.Text)+''',联系方式='''+trim(edit6.Text)+''',出生年月='''+datetostr(DateTimePicker1.Date)+''',入学时间='''+datetostr(DateTimePicker2.Date)+''' where 学生姓名='''+trim(Sname)+'''');

猜你喜欢

转载自blog.csdn.net/xyzhan/article/details/90484248