‘language‘不能作为表名或字段名

今天写一个C#访问Access的程序,拼接SQL语句时一直出错,

string sql = "insert into dllinfos (dllname,dllfilename,type,functions,harm,repairmethod,issys, paths, ishorse, language, version, company) values ('" + textBox1.Text + "','" + textBox2.Text + "','" +
                    textBox3.Text + "','" + textBox4.Text + "','" + textBox5.Text + "','" + textBox6.Text + "','" + textBox7.Text + "','" +
                    textBox8.Text + "','" + textBox9.Text + "','" + textBox10.Text + "','" + textBox11.Text + "','" + textBox12.Text + 
                    "');";

查了很久;

原来 language 应该是Access或一些数据库的一个保留关键字,不能直接用作字段名;

改为 mylanguage 之类即可;

修改字段名,

 

最近更新

  1. docker php8.1+nginx base 镜像 dockerfile 配置

    2024-04-24 11:28:06       94 阅读
  2. Could not load dynamic library ‘cudart64_100.dll‘

    2024-04-24 11:28:06       100 阅读
  3. 在Django里面运行非项目文件

    2024-04-24 11:28:06       82 阅读
  4. Python语言-面向对象

    2024-04-24 11:28:06       91 阅读

热门阅读

  1. 停车场管理系统(栈和队列的实现和应用)(cpp)

    2024-04-24 11:28:06       36 阅读
  2. 各类数据引擎指定schema或者数据库

    2024-04-24 11:28:06       30 阅读
  3. linux中新建一个超级管理员

    2024-04-24 11:28:06       38 阅读
  4. vue-json-editor

    2024-04-24 11:28:06       35 阅读
  5. map_or

    2024-04-24 11:28:06       31 阅读
  6. 如何对同一docker注册表使用多个身份验证/登录

    2024-04-24 11:28:06       30 阅读
  7. 深入Spring Boot配置机制:如何高效管理应用配置

    2024-04-24 11:28:06       26 阅读
  8. C++笔记

    C++笔记

    2024-04-24 11:28:06      29 阅读