小编use*_*067的帖子

Sqlite"更新"C#语法错误

嗨以下代码给出语法错误.我不知道如何解决问题.

错误

{"SQLite error\r \nnear \"Mytext \":语法错误"}

我的守则

string dataSource = "Database.s3db";
SQLiteConnection connection = new SQLiteConnection();
connection.ConnectionString = "Data Source=" + dataSource;
connection.Open();
SQLiteCommand command = new SQLiteCommand(connection);
command.CommandText = ("update Example set Info ='" + textBox2.Text + ", Text ='"+textBox3.Text + "where ID ='" + textBox1.Text +"'");
command.ExecuteNonQuery();
Run Code Online (Sandbox Code Playgroud)

c# sql sqlite syntax

6
推荐指数
1
解决办法
2万
查看次数

标签 统计

c# ×1

sql ×1

sqlite ×1

syntax ×1