使适用于 MS SQL 的 SAP Business One C# 代码与 SAP HANA 兼容
Make SAP Business One C# code for MS SQL compatible with SAP HANA
我有以下与 MS SQL 兼容的代码。我用它来记录使用 Log4Net 的错误。
如何使它与 SAP HANA 兼容,如语法正确?
string connectionString = @"Data Source=server;Initial Catalog=SBODemoUS;Persist Security Info=True;User ID=sa;Password=pass";
appender.CommandText = string.Format("INSERT INTO {0} ([Date],[Thread],[Level],[Logger],[Message],[Exception]) VALUES (@log_date, @thread, @log_level, @logger, @message, @exception)", logTableName);
appender.ConnectionType = "System.Data.SqlClient.SqlConnection, System.Data,Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b77a5c561934e089";
appender.ConnectionString = connectionString;
我对 INSERT 语句以及在 appender.ConnectionType
中放置什么字符串特别感兴趣
SAP Business One 有 .NET SDK 和 SAP HANA,但在这种情况下,您试图向 HANA 数据库而不是 SQL 服务器插入内容,因此您的代码无法重复使用
我有以下与 MS SQL 兼容的代码。我用它来记录使用 Log4Net 的错误。
如何使它与 SAP HANA 兼容,如语法正确?
string connectionString = @"Data Source=server;Initial Catalog=SBODemoUS;Persist Security Info=True;User ID=sa;Password=pass";
appender.CommandText = string.Format("INSERT INTO {0} ([Date],[Thread],[Level],[Logger],[Message],[Exception]) VALUES (@log_date, @thread, @log_level, @logger, @message, @exception)", logTableName);
appender.ConnectionType = "System.Data.SqlClient.SqlConnection, System.Data,Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b77a5c561934e089";
appender.ConnectionString = connectionString;
我对 INSERT 语句以及在 appender.ConnectionType
中放置什么字符串特别感兴趣SAP Business One 有 .NET SDK 和 SAP HANA,但在这种情况下,您试图向 HANA 数据库而不是 SQL 服务器插入内容,因此您的代码无法重复使用