插入日期到我的數據庫 插入查詢時,我有問題:插入日期時間錯誤
INSERT INTO users (f_name, s_name, t_name,family_name, age, national_id,
telephone, mobile, address, job_name, company_code, start_date, end_date)
VALUES (N'" + fname + "',N'" + sname + "',N'" + tname + "',N'" + famiy_name +
"',N'" + age + "',N'" + national_id + "',N'" + telephone +
"',N'" + mobile + "',N'" + address + "',N'" + job_name + "',N'" +
company_code + "'," + start_date + "," + end_date + ")";
注意大寫字母「N」項前能夠插入阿拉伯語詞彙
錯誤信息:
'12'附近語法不正確。
雖然從文字可視化的日期格式爲
05/11/2010 12:00:00 AM
我用DB VS2010的SQL Express 2008
您是否需要「N」來插入數值? –
「N」插入阿拉伯文字符串 – user1054699