var user = await db.QueryAsync<individual>("insert into usersinfo (Image) values ('" +img+ "') where Id=" +userID);
這是錯誤:凡在INSERT語句中使用SQLite
Additional information: near "where": syntax error
var user = await db.QueryAsync<individual>("insert into usersinfo (Image) values ('" +img+ "') where Id=" +userID);
這是錯誤:凡在INSERT語句中使用SQLite
Additional information: near "where": syntax error
SQL支持更新命令,你可以使用它嗎?
UPDATE
Table
SET
Field = VALUE
WHERE
Id = userID
在SQL insert
命令不支持where
條款,除非與insert into ... select
形式使用。
你的聲明似乎不以特色insert into select
形式,所以它應該被設置爲:
insert into usersinfo (Image) values ('" +img+ "')
我不是sqllite專家,但在SQL有INSERT INTO
聲明:
INSERT INTO table1
col1,
col2,
col3
SELECT col1, col2, col3
FROM table1
WHERE ...;
img和userID的值是什麼 – RyPope 2014-09-12 12:19:51
表的設計在哪裏?用戶信息有id字段,它是什麼類型?發佈相關信息很難嗎? – Reniuz 2014-09-12 12:20:44
你想插入還是更新?不清楚給我。 – 2014-09-12 12:49:13