问题的来源

今天把一个项目的数据库从MySQL改到Sqlite 调试时发生了这个错误.

百度又看不懂英文(很多是国外发的), 就折腾了一下

原因

C# Sqlite 不能使用参数前缀”?”, 换成”@”就萌大奶了

            SQLiteCommand cmd = Conn.Connection.CreateCommand();
cmd.CommandText = "SELECT id FROM `work` WHERE date=@date AND line=@line";
cmd.Parameters.AddWithValue("@date", date.ToLongDateString());
cmd.Parameters.AddWithValue("@line", line);
return cmd.ExecuteNonQuery() > 0;

[错误] SQL logic error near "date": syntax error的更多相关文章

  1. 安装SQL Servre2000时提示“command line option syntax error! type command /? for help”

    问题: 当程序正在安装ms数据访问组件时,弹出错误提示框:command line option syntax error,type command/? for help,点击确定继续:到了程序正在安 ...

  2. 数据库操作语法错误(SQL syntax error)之两步走

    今天在做web应用操作数据库时出现了语法错误,提示的是在“xxxxxxx”附近出现了语法错误:CODE:Error: You have an error in your SQL syntax. Che ...

  3. ERROR: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'type=InnoDB' at line 7

    问题: 使用hibernate4.1.1,数据库使用mysql5.1.30,使用hibernate自动生成数据库表时,hibernate方言使用org.hibernate.dialect.MySQLI ...

  4. com.alibaba.druid.sql.parser.ParserException: syntax error, QUES %, pos 80 like报错解决

    最近,把各应用的jdbc连接池统一从dbcp2改成了druid,运行时druid报sql解析错误,如下: select * from test         where 1=1         &l ...

  5. syntax error, error in :'e id=1?', expect QUES, actual QUES pos 66, line 1, column 66, token QUES错误

    在查询数据库的时候报了下面的异常: syntax error, error in :'e id=1?', expect QUES, actual QUES pos 66, line 1, column ...

  6. SQL logic error or missing database no such table: xxx

    原文:SQL logic error or missing database no such table: xxx System.Data.SQLite.SQLiteException (0x8000 ...

  7. myeclipse中导入js报如下错误Syntax error on token "Invalid Regular Expression Options", no accurate correc

    今天在使用bootstrap的时候引入的js文件出现错误Syntax error on token "Invalid Regular Expression Options", no ...

  8. Linux中syntax error near unexpected token 错误提示解决方法

    Linux中syntax error near unexpected token ... 错误提示有一般有两种原因: 1)window和Linux下换行符不一致导致 window下的换行和Linux下 ...

  9. AspNetPager控件报错误: Syntax error, unrecognized expression: input#ctl00$ContentPlaceHolder1$Aspnetpager1_input问题解决[摘]

    高版本IE,如IE10或者IE11在浏览页面时出现错误: Syntax error, unrecognized expression: input#ctl00$ContentPlaceHolder1$ ...

  10. C++编译错误syntax error : identifier 'THIS_FILE' 解决方法

    你到代码里搜索 THIS_FILE看是不是它定义在别的头文件前面了,如果是,把它们的头文件紧跟到Stdafx.h后面 我遇到过这问题,这样搞定的 今天遇到个编译错误:..\vc98\include\n ...

随机推荐

  1. 记一次处理挖矿程序引发的postgres 连接超时

    近一段时间内发现自己的服务器总是警告被挖矿,然处理挖矿程序中也引发了许多其他的问题,也从中学到了其他的知识,趁今天未加班梳理一下便于巩固,记录日常 文章目录 一.查找进程 1.使用 ll /proc/ ...

  2. Module build failed: Error: Plugin/Preset files are not allowed to export objects, only functions.

    运行项目是提示Module build failed: Error: Plugin/Preset files are not allowed to export objects, only funct ...

  3. CKS 考试题整理 (14)-启用API Server认证

    Context 由 kubeadm 创建的cluster 的kubernetes API 服务器,出于测试目的, 临时配置允许未经身份验证和未经授权的访问,授予匿名用户 cluster-admin 的 ...

  4. 从源码级剖析Java类加载原理

    相信大多数熟悉Java的研发工程师,都知道Java类加载原理:Java中的类是由类加载器采用双亲委派机制进行加载.其中,Java核心库中实现了三种类型的类加载器,它们分别是:引导类加载器Bootstr ...

  5. LeetCode 周赛 352(2023/07/02)一场关于子数组的专题周赛

    本文已收录到 AndroidFamily,技术和职场问题,请关注公众号 [彭旭锐] 和 [BaguTree Pro] 知识星球提问. 往期回顾:LeetCode 单周赛第 350 场 · 滑动窗口与离 ...

  6. 【Qt 应用】模仿实现Win10的Wifi列表

    这里使用 Qt 模仿实现了 Win10 系统下的 Wifi 列表,主要用的是 QlistWidget + xml + cmd命令行 实现. 效果 下载地址 https://github.com/con ...

  7. vue3中父组件与组件之间参数传递,使用(defineProps/defineEmits),涉及属性传递,对象传递,数组传递,以及事件传递

    Vue3 中子父组件之间的通信 一.父组件传递参数到子组件 采用defineProps 传递属性 父组件: <template> <div> <h1>这是父组件&l ...

  8. Chrome浏览器,有道云笔记的网页剪报需要多次登录且收藏失败报错

    报错代码 {"canTryAgain":false,"scope":"SECURITY","error":"2 ...

  9. 图像处理评价指标_划分系数Vpc划分熵Vpe

    划分系数划分熵 评价指标划分系数Vpc和划分熵Vpe能够反映分割矩阵的模糊程度,Vpc数值越大,分割矩阵的模糊性越小,分割效果越好:Vpe数值越小,像素分类越准确,分割效果越好. (1)划分系数Vpc ...

  10. 利用Anaconda3安装tensorflow/keras,并迁移虚拟环境至不能上网的电脑

    利用Anaconda3安装tensorflow/keras,并迁移虚拟环境至不能上网的电脑 下面记录下利用Anaconda安装tensorflow和keras,前前后后也踩了不少坑.并分别在windo ...