procedure TForm_course_result.Button1Click(Sender: TObject);
begin try
ado_temp.Close;
ado_temp.SQL.Clear;
ado_temp.sql.Add('delete from student_score');
ado_temp.Prepared;
ado_temp.ExecSQL;
ado_Temp.Close;
ado_temp.SQL.Clear;
ado_temp.SQL.Add('insert into student_score(course_id,student_id,score) select course_id,student_id,0'' from student_selectcourse');
ado_temp.Prepared;
ado_temp.ExecSQL;
except
application.MessageBox('数据初始化失败!','系统提示',0);
exit;
end;
ado_szye.Close;
ado_szye.Open;
end;end.我想把表student_selectcourse的所有记录导入表student_score,并且只导入course_id,student_id,score三个字段内容,为什么调试出错,提示是‘FROM student_selectcourse 之前有未闭合的引号’?
begin try
ado_temp.Close;
ado_temp.SQL.Clear;
ado_temp.sql.Add('delete from student_score');
ado_temp.Prepared;
ado_temp.ExecSQL;
ado_Temp.Close;
ado_temp.SQL.Clear;
ado_temp.SQL.Add('insert into student_score(course_id,student_id,score) select course_id,student_id,0'' from student_selectcourse');
ado_temp.Prepared;
ado_temp.ExecSQL;
except
application.MessageBox('数据初始化失败!','系统提示',0);
exit;
end;
ado_szye.Close;
ado_szye.Open;
end;end.我想把表student_selectcourse的所有记录导入表student_score,并且只导入course_id,student_id,score三个字段内容,为什么调试出错,提示是‘FROM student_selectcourse 之前有未闭合的引号’?
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货