VB语法错误 [英] VB syntax error

查看:154
本文介绍了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"

解决方案


HI,我收到一个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可能令人沮丧,因为当查询变得非常大时,很难对它们进行故障排除。但请耐心等待,如果你必须在记事本或其他东西中分开,并仔细检查它们。


感谢您的帮助,我只是习惯在VB中做SQL


感谢您的帮助,我刚刚习惯在VB中做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 "

解决方案

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.


Thanks for the help, I am just getting used to doing SQL in VB


Thanks for the help, I am just getting used to doing SQL in VB

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语法错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆