cancel
Showing results for 
Search instead for 
Did you mean: 

-8008: Error while trying to initialize database

kkphan
Participant
0 Kudos

I'm trying to write an ASP .Net web application to connect to SBO 2004 database using DI API 6.7. Below is the code segment to connect to database:

Private Function SBO_connect()

dim oCompany as New SAPbobsCOM.Company

oCompany.CompanyDB = "SBODemo_SG"

oCompany.Server = "win2k1"

oCompany.UserName = "manager"

oCompany.Password = "manager"

oCompany.language = SAPbobsCOM.BoSuppLangs.ln_English

return oCompany.connect()

End Function

But I get this message when I tried to run it:

-8008: Error while trying to initialize database

I have also tried to use DbUserName and DbPassword, it gave me the same output. I have assign administrator right to ASPNET user. What else can I do? Thanks for any advice.

Accepted Solutions (0)

Answers (1)

Answers (1)

Trinidad
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi,

Have you tried to set the company property "UseTrusted" to true?

Is your database and Business One version the same as your SDK version?

Trinidad.

kkphan
Participant
0 Kudos

Now I encounter another problem. When I use the same code and tried to access, I have this message:

-103 Connection to the company database has failed.

I have also tried to set the UseTrusted to true

The SDK ersion is 6.7 and the Business One version is 2004B.

The strange thing is I have tried the same code on another machine with the same setup, the other machine works fine. The only difference is this other machine is a development machine.

Trinidad
Product and Topic Expert
Product and Topic Expert
0 Kudos

What do you mean when you say it works in a development machine?

What is the difference between both machines? Do they use the same database? And the same users defined?

Does B1 work in both machines with the same database and user?

If it works in one machine and not in the other one then the problem must have something to do with the environment and not with your code I will say...

Trinidad.

Former Member
0 Kudos

Were you able to find a solution to these problems? I am encountering the same errors.

Mark

jaccomoolenaar
Participant
0 Kudos

I have experienced this problem several times (error -103). If it is the same problem it can be solved by:

1. start enterprise manager

2. go to the database your trying to connect to.

3. go to 'users'

4. if user OBSCOMMON has an empty login name this is the problem. Remove the user OBSCOMMON and add it again with: username OBSCOMMON, loginname OBSCOMMON and with the db_owner permission checked.

5. try again to connect and in my case the problem was solved.

Regards