on 03-15-2005 1:33 AM
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.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
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.
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
User | Count |
---|---|
110 | |
12 | |
11 | |
6 | |
5 | |
4 | |
4 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.