on 01-19-2005 9:50 PM
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
Try
oCompany = New SAPbobsCOM.Company
With oCompany
.Server = "(local)"
.CompanyDB = "SBODemo_US"
.UserName = "manager"
.Password = "manager"
.language = SAPbobsCOM.BoSuppLangs.ln_English
End With
oCompany.Connect()
If oCompany.Connected = False Then
oCompany.GetLastError(i_Error, s_Error)
Return s_Error
Else
oCompany.Disconnect()
Return 0
End If
Catch ex As Exception
Finally
oCompany = Nothing
End Try
End Function
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.
Regards,
Ibai Peñ
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
Thanks,
Greg
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
oCompany.UseTrusted = false
oCompany.DbUserName="sa"
oCompany.Dbpassword=""
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.
User | Count |
---|---|
94 | |
11 | |
11 | |
6 | |
6 | |
4 | |
3 | |
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.