环境: 适用于Oracle的DevArt驱动程序 .NET 4.5
我正在尝试执行以下语句:
INSERT INTO T_CUSTOMERS_T
("ID", "NAME1", "NAME2", "NAME", "STREET",
"POSTAL", "CITY", "COUNTRY", "TEL", "MAIL",
"STATE", "STATE_EX", "REF")
VALUES
(N'23frRRrg', N'Peter', N'Hansel', N'Peter Hansel', N'Flowerpowerstreet 5',
N'88558', N'New York', N'US', N'1801810', N'info@fixmeplease.com',
N'VALID', N'Record is valid', NULL);
我从devart驱动程序中得到以下异常:
Type: OracleException
Message: ORA-01756: quoted string not properly terminated
Call Stack: at Devart.Data.Oracle.ax.c(Int32 A_0)
at Devart.Data.Oracle.b9.a(String A_0)
at Devart.Data.Oracle.OracleCommand.InternalPrepare(Boolean implicitPrepare, Int32 startRecord, Int32 maxRecords)
at Devart.Common.DbCommandBase.ExecuteDbDataReader(CommandBehavior behavior, Boolean nonQuery)
at Devart.Data.Oracle.OracleCommand.ExecuteNonQuery()
at DataConnection.AddRecords(TableMetadata TableStructure, Dictionary`2[] Records)
修改
我用odbc oracle驱动程序执行了语句,它运行正常。我明天会更新devart驱动程序,看看是否能解决问题。
答案 0 :(得分:0)
基于DevArt文档OracleDataAdapter
INSERT INTO myTable(col1,col2col5,col7) VALUES ('data1','data2','data3',NULL)