cancel
Showing results for 
Search instead for 
Did you mean: 

DbServerType = 0 when trying to use dst_MSSQL2014

Former Member
0 Kudos

Hello, I'm working on a windows service that connects to SAP via DI API using SAPBobsCOM.

To connect to the company, I load all the parameters in the normal way. Here's a part of the code:

            oCompany = New SAPbobsCOM.Company

            'Set settings

            oCompany.Server = ConfigurationManager.AppSettings("DatabaseServerName")

            oCompany.DbServerType = SAPbobsCOM.BoDataServerTypes.dst_MSSQL2014

I'm having a problem on just one machine, where when I run the service I'm getting the error "(-125) no database server type specified". If I print oCompany.DbServerType then I get as result a zero ( 0 ) .

This is not related at all with having or not SQL 2014 installed, as I already tested this on a machine runnnig SQL 2008 and I can see dst_MSSQL2014 even if it does not connect. It has to be related to that particular machine since on another machine of the same network the service runs OK. Maybe something important to mention is that this machine did not have anything related to SAP until I installed the DI API yesterday.

I compiled using SAPBobsCOM version 9.10.150, this machine has on its machine a version 9.10.105.

Any help would be greatly appreciated.

Thanks in advance,

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

I would try to update the DI API

Former Member
0 Kudos

Hi Sergio,

Which DotNet Framework is the project targetting?

Regards,

Eric

Former Member
0 Kudos

Hi Eric!

Target framework: .NET Framework 4

Former Member
0 Kudos

Hi Sergio,

So the proxies are incorporated by default when you reference the COM components... Except if you modified (just like I'm doing) the properties of the COM Reference.

9.10.105 was one of the earlier PL for the 9.10 version, which should be used anymore now, but I don't remind if the support of the SQL-Server 2014 was effective on that time...

Should perhaps upgrade this machine and setup the correct proxies...

Regards,

Eric

Former Member
0 Kudos

Eric, this version supports SQL 2014 because I got it working on another machine.

former_member201110
Active Contributor
0 Kudos

Hi Sergio,

Is the SQL Native Client 2014 installed on the machine with the issue? If it's not then you will get a connection error when trying to connect via the DI API.

Kind Regards,


Owen

Former Member
0 Kudos

Thanks Owen! Unfortunately I checked and I was able to run the service on a machine that does not have the Native Client 2014 installed so I guess we can rule this out as the problem. Furthermore, please note that the problem is not actually a SQL Server error: the DbServerType property is being modified from the number eight (8) to the number "0"  (zero) and that's why the service does not connect.

Thanks again for your input!

Any other ideas?

Former Member
0 Kudos

Hi Sergio,

As stated by Owen, SQL Native Cleint has to be installed for the DI to work. You can have the impression it is working, but at some point or another one it will break.

Besides this, the 910105 PL was (if my memory is not too bad) 9.10 PL01 (first ramp-up) and at that time, support of SQL2014 was included, but undocumented, in the SDK.

So, a good try, would be to have the same version installed anywhere and the addon recompiled with it by checking the correct proxies are referenced / used

Issue is in the proxies and the fact that the COM object (SAPbobsCOM) doesn't recognize the enumerate.

Regards,

Eric