cancel
Showing results for 
Search instead for 
Did you mean: 

Method of using ADO.Net connect to SAP Company DB

Former Member
0 Kudos

Hi everyone,

I'd like to create an Ado.net SqlClient connection for SAP Company DB and maintain my own UDT, I can not using SQL security authentication, becaust DBPassword property in SAP DI API company object is not a real password string, just a string of "******" (is there any way to get DBPassword?), So I change to use Integrated Windows authentication, below is my connectionstring:

Dim cn As New SqlClient.SqlConnection
cn.ConnectionString ="data source=Test_Workstation;initial catalog = SBODemo_US;
Integrated Security=SSPI;persist security info=False;"

but this connection string still have problem when connect to company DB server, if current windows user does not have right to login to the company DB server. it shows Login failed error. but I can run SAP to the company DB Server. Who can give me some sugestion create a safe and Stable connection to SAP DB using ADO.Net.

Thanks in advance!

Kathy

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Lanjun,

You cannot get the password as it is encrypted - for good reason too Why do you not use the standard object within SBO to manage and maintain your UDT and do queries. You can use the UserTable object to maintain the data (with integrity) in your UDT and also use the RecordSet object to retrieve queries. What is your reason for using ADO?

Hope it helps,

Adele

Former Member
0 Kudos

Hi Adele,

Thanks for your replying,

The reason that I want to use ADO.Net is because I need to do lots of calculate and filter inside my UDT, ADO.Net datatable/dataset have more functions to implement my requirement and the most important thing for me is ADO.Net can raise very detail error information when error occurs, it's easy to troubleshooting.

Any way, do you have some way using ADO.Net create connection to company DB?

Thanks again!

Lanjun

Former Member
0 Kudos

Hi Lanjun,

The only way you can do this is if you save the sql password somewhere. You cannot retrieve the sql password from the company or application object.

Hope it helps,

Adele

Answers (0)