I don't know wheter this is a difference from programming with asp.net and vb6, but have you already tryed:
sboCompany.Server = "(local)";
instead of
sboCompany.Server = "localhost";
?
That's what I do in VB6.
Florian
This is the code I use to connect in an asp.net page:
Private Sub ConnectToCompany()
oCompany = New SAPbobsCOM.Company
oCompany.Server = "servername"
oCompany.CompanyDB = "databasename"
oCompany.UserName = "username"
oCompany.Password = "password"
oCompany.language = SAPbobsCOM.BoSuppLangs.ln_English
oCompany.Connect()
oCompany.GetLastError(lErrCode, sErrMsg)
If lErrCode <> 0 Then
Response.Write("error connecting to company: " & sErrMsg)
End If
End Sub
So it is impossible to have the database server on one machine, and use asp.net on another machine to access through sapbobscom?
Add comment