cancel
Showing results for 
Search instead for 
Did you mean: 

Error Di Add-on at DbServerType

Former Member
0 Kudos

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

Accepted Solutions (0)

Answers (3)

Answers (3)

edy_simon
Active Contributor

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

thomasthutewohl
Explorer

Hello,

try this:

oCompany.DbServerType = BoDataServerTypes.dst_MSSQL2012

Kind regards,

Thomas

Former Member
0 Kudos

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