gpt4 book ai didi

mysql - 运行sql语句时出错

转载 作者:行者123 更新时间:2023-11-29 06:03:57 26 4
gpt4 key购买 nike

我在vb.net中运行这条语句时出错,出现如下错误错误 [42000] [Microsoft][ODBC Microsoft Access Driver] 查询表达式 'Request.GodownFROM Request WHERE (((Request.Rdate)=#03/27/2017#) AND ((Request.Godown )='印度人''。

sql = "SELECT Request.[Rdate], Request.[Item Name], Request.[Category], Request.[Unit], Request.[Quantity], Request.[Rate], Request.[Amount], Request.[Godown]" _
& "FROM Request WHERE Request.[Rdate]=#" & dtrdate.Value & "# AND Request.[Godown]='" & lblgodown.Text & "'"

Dim da As New System.Data.Odbc.OdbcDataAdapter(sql, con)

da.Fill(dt)
dgtvgo1.DataSource = dt

最佳答案

“[from...]”前需要一个空格。所以将第二行改为“[from...”

关于mysql - 运行sql语句时出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43038607/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com