我有以下与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中要放置的字符串特别感兴趣
答案 0 :(得分:0)
SAP Bussines One有一个.NET SDK和SAP HANA,但在这种情况下,您尝试向HANA DataBase插入一些内容而不是SQL Server,因此您的代码无法重复使用