Showing results for 
Search instead for 
Did you mean: 

Error -8008 - Error While Trying To Initialize Database

Former Member
0 Kudos

While trying to connect to a 2004A database using DI API 6.7 and a VB.NET web page, I get the error listed in the title of this post. I was wondering if someone could give me a hint as to what this error message refers to and how I might be able to resolve it. Thanks in advance for your input.

Public Function Connect() As String

        Dim s_Error As String
        Dim i_Error As Integer


            oCompany = New SAPbobsCOM.Company

            With oCompany

                .Server = "(local)"
                .CompanyDB = "SBODemo_US"
                .UserName = "manager"
                .Password = "manager"
                .language = SAPbobsCOM.BoSuppLangs.ln_English

            End With


            If oCompany.Connected = False Then
                oCompany.GetLastError(i_Error, s_Error)

                Return s_Error

                Return 0
            End If

        Catch ex As Exception


            oCompany = Nothing

        End Try
    End Function

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Greg,

I would try using the dbservertype, dbusername, and dbpassword properties, or UseTrusted instead of them.

I suppose that code is not connecting to the database becouse it this parameters are wrong.


Ibai Peñ

Answers (1)

Answers (1)

Former Member
0 Kudos

For everyone's benefit, I was able to solve this issue by elevating priveledges for the ASPNET user account. In the end the code that I posted worked perfectly.



0 Kudos

I encountered the same problem. May I know what privilege have you given to ASPNET user?

Former Member
0 Kudos

oCompany.UseTrusted = false



It works fine for the samples (windows forms), but when i try to do it through ASP.NET, it gives me this error

"Error While Trying To Initialize Database"

Do I need ASPNET account ? I yes, what priviledges do I need to give to ASPNET user account.