Skip to Content
avatar image
Former Member

Make B1 C# code for MS SQL compatible with SAP HANA

Hello all,

I have the following code that is compatible with MS SQL. I use it to log errors using Log4Net.

How do I make this compatible with SAP HANA?

string connectionString = @"Data Source=KINYANJUI-PC;Initial Catalog=SBODemoUS;Persist Security Info=True;User ID=sa;Password=navyseal";

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;

Any help appreciated.

I am particularly interested in the INSERT statement and what string to place in the appender.ConnectionType

Kinyanjui

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer