Skip to Content
0

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

Nov 02, 2017 at 12:37 PM

38

avatar image
Former Member

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

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Sergio Guerrero Nov 02, 2017 at 12:44 PM
0
Show 1 Share
10 |10000 characters needed characters left characters exceeded
Former Member

Thanks Sergio,

I had gone through the articles but they don't mention what to place for connection type.

0