本文介绍了VB语法错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

限时删除!!

我收到一个sytax错误,说我的逗号不在正确的地方。我已经多次以不同的形式重写了这段代码而且我仍然遇到运行时语法错误,


感谢您的帮助


mStringSQL =" DELETE Driver_daily_logs.emp_id,Driver_daily_logs.date_recieved," _

& Driver_daily_logs.violation,Driver_daily_logs.form_manner,Driver_daily_logs.log_status," _

& Driver_daily_logs.status_date,Driver_daily_logs.date_destroyed _

& Driver_daily_logs.comments,Driver_daily_logs.log_id _

& FROM Driver_daily_logs

& GetDate()> date_destroyed"

解决方案



你错过了逗号


& Driver_daily_logs.status_date,Driver_daily_logs.date_destroyed _

& Driver_daily_logs.comments,Driver_daily_logs.log_id _


SQL可能令人沮丧,因为当查询变得非常大时,很难对它们进行故障排除。但请耐心等待,如果你必须在记事本或其他东西中分开,并仔细检查它们。




没问题


是的,我理解。就像我说的SQL查询越大,排除故障就越困难,所以有时你只需要做旧的凝视和比较。用眼睛。


HI, I am getting a sytax error saying that I have a comma that is not in a correct place. I have re-written this code many times over in idfferent forms and I am still getting the runtime syntax error,

Thanks for the help

mStringSQL = "DELETE Driver_daily_logs.emp_id, Driver_daily_logs.date_recieved, " _
& "Driver_daily_logs.violation, Driver_daily_logs.form_manner, Driver_daily_logs.log_status, " _
& "Driver_daily_logs.status_date, Driver_daily_logs.date_destroyed " _
& "Driver_daily_logs.comments, Driver_daily_logs.log_id " _
& "FROM Driver_daily_logs"
& "Where GetDate() > date_destroyed "

解决方案

Your missing a comma between

& "Driver_daily_logs.status_date, Driver_daily_logs.date_destroyed " _
& "Driver_daily_logs.comments, Driver_daily_logs.log_id " _

SQL can be frustrating because when the querys get really big it is hard to troubleshoot them. But be patient, seperate out sections if you have to in notepad or something and go over them carefully.



No problem

Yeah I understand. Like I said the bigger the SQL query the more difficult it becomes to troubleshoot, so sometimes you just have to do the old "stare and compare" by eye.


这篇关于VB语法错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

1403页,肝出来的..

09-06 12:13