以文本方式查看主题 - Foxtable(狐表) (http://foxtable.net/bbs/index.asp) -- 专家坐堂 (http://foxtable.net/bbs/list.asp?boardid=2) ---- 插入数据报错 (http://foxtable.net/bbs/dispbbs.asp?boardid=2&id=191936) |
-- 作者:lds -- 发布时间:2024/5/16 18:10:00 -- 插入数据报错 For Each dr As DataRow In DataTables("批发价").DataRows Dim rqi As Date = cmd.CommandText = " insert into {init_LKY_AMBNBJYJ}(INIT_INDEX,adate) values (" & dr("INIT_INDEX") & "," & Format(dr("日期"), "yyyy-mm-dd") & " )" cmd.ExecuteNonQuery() Next转换日期类型报错 |
-- 作者:lds -- 发布时间:2024/5/16 18:18:00 -- oracle 数据库 |
-- 作者:lds -- 发布时间:2024/5/16 18:23:00 -- Dim rqi As Date = cmd.CommandText = " insert into {init_LKY_AMBNBJYJ}(INIT_INDEX,adate) values (" & dr("INIT_INDEX") & ",\'" & dr("日期") & "\' )"转文本也报错 |
-- 作者:有点蓝 -- 发布时间:2024/5/16 20:20:00 -- https://www.baidu.com/s?wd=orale%20insert%20into%20%E6%97%A5%E6%9C%9F Dim rqi As Date = cmd.CommandText = " insert into {init_LKY_AMBNBJYJ}(INIT_INDEX,adate) values (" & dr("INIT_INDEX") & ",TO_DATE(\'" & Format(dr("日期"), "yyyy-MM-dd") & "\', \'YYYY-MM-DD\'))" |
-- 作者:lds -- 发布时间:2024/5/17 11:34:00 -- 收到谢谢 |