on 07-04-2007 6:54 AM
Hi All,
I am facing a problem when i am connecting to the company.. But it is not happening always.. All of sudden this exception is coming..
the Exception is ,, " Object Reference not set to an instance of an object"
The exception occurs at <b>" oCompany.Connect()[ "</b>
The code is
Private Sub ConnectToCompany()
oCompany = New SAPbobsCOM.Company
oCompany.Server = "90.180.150.115"
'oCompany.CompanyDB = "xenosproduction"
oCompany.CompanyDB = "XenosBB"
oCompany.UserName = "manager"
oCompany.Password = "manager"
oCompany.language = SAPbobsCOM.BoSuppLangs.ln_English
oCompany.DbUserName = "sa"
oCompany.DbPassword = "sapb1@sql"
Try
<b> oCompany.Connect()</b> Catch ex As Exception
MessageBox.Show(ex.Message)
End Try
' Check for errors during connect
oCompany.GetLastError(lErrCode, sErrMsg)
If lErrCode <> 0 Then
MsgBox(sErrMsg)
Else
MsgBox("Connection Established", MsgBoxStyle.Information)
End If
End Sub
Pl help me on this..
Regards
Suresh R
Hi Suresh,
Everything seems fine in my opinion. Are you sure your SBO version and DI API version is the same?
Hope it helps,
Adele
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
98 | |
11 | |
11 | |
6 | |
6 | |
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.