使用像这样的Access数据库:
SELECT pt.regno, pt.rfid, MAX(vrt), MAX(fot), MAX(rit), MAX(MI), MAX(wi), MAX(Mo), MAX(wo) FROM (
SELECT *
FROM (
SELECT * from @temtable2 t
) SourceTable
PIVOT
(
max(timec)
FOR eventb
IN('Veh Reg Time' AS vrt,'Ftness Ok time' AS fot, 'RFID Issue time' AS rit, 'MG-IN' AS mi, 'WB IN' AS wi, 'MG-OUT' AS mo, 'WB OUT' AS wo)
) PivotTableAlias) pt
GROUP BY pt.regno, pt.rfid
我试过了:
请有人帮助我......
答案 0 :(得分:2)
密码是保留关键字
cmd.CommandText = "INSERT INTO Users (Username, Password, Email, Address...
试试这个
cmd.CommandText = "INSERT INTO Users (Username, [Password], Email, Address...
答案 1 :(得分:0)
你能试试吗?
"INSERT INTO Users (Username, Password, Email, Address, Question, Answer)
VALUES(
'" + txtUsernameRP.Text + "',
'" + txtPasswordRP.Text + "',
'" + txtEmailRP.Text + "',
'" + txtAddressRP.Text + "',
'" + txtQuestionRP.Text + "',
'" + txtAnswerRP.Text + "');";
答案 2 :(得分:0)
我猜您的问题出在int i
上,请尝试将其删除