Skip to Content
avatar image
Former Member

Error Di Add-on at DbServerType

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

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • Mar 24, 2017 at 11:42 AM

    Hello,

    try this:

    oCompany.DbServerType = BoDataServerTypes.dst_MSSQL2012

    Kind regards,

    Thomas

    Add comment
    10|10000 characters needed characters exceeded

  • Mar 27, 2017 at 12:45 AM

    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

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Mar 24, 2017 at 12:13 PM

    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

    Add comment
    10|10000 characters needed characters exceeded