Skip to Content
0

Error Di Add-on at DbServerType

Mar 24, 2017 at 11:14 AM

69

avatar image
Former Member

Hello experts ,

I am trying to make a connection with di add-on but i received the following error : Conversion from string "BoDataServerTypes.dst_MSSQL2012" to type 'Integer' is not valid.

Here is the code :

  Dim line As String = "BoDataServerTypes.dst_MSSQL2012"
  oCompany.DbServerType = line

I understand that the type is wrong but how can i convert the string in order to work the connection?Please advice.

Kind Regards,

Ifigeneia

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

3 Answers

avatar image
Former Member Mar 24, 2017 at 11:42 AM
1

Hello,

try this:

oCompany.DbServerType = BoDataServerTypes.dst_MSSQL2012

Kind regards,

Thomas

Share
10 |10000 characters needed characters left characters exceeded
Edy Simon Mar 27, 2017 at 12:45 AM
1

Hi Ifigeneia,


If you need to use variable, then you need to declare your variable as BoDataServerTypes

Dim o as SAPbobsCOM.BoDataServerTypes = BoDataServerTypes.dst_MSSQL2012

oCompany.DBServerType = o

Regards

Edy

Share
10 |10000 characters needed characters left characters exceeded
avatar image
Former Member Mar 24, 2017 at 12:13 PM
0

Hello Thomas,

The correct is that :oCompany.DbServerType = "BoDataServerTypes.dst_MSSQL2012" thank you for the answer but i must use a variable for that.

Kind Regards ,

Ifigeneia

Share
10 |10000 characters needed characters left characters exceeded