on 05-06-2012 8:24 AM
Hi
Public Class Form1
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim oCompany As SAPbobsCOM.Company
Dim lRetCode, lErrCode As Long
Dim sErrMsg As String
'Instantiate a Company object
oCompany = New SAPbobsCOM.Company
oCompany.Server = "(local)"
oCompany.CompanyDB = "ABC"
oCompany.UserName = "manager"
oCompany.Password = "manager"
'Set AddOn identifier – a long string with numbers; identifies
'your Add-On against License Service … optional!
'oCompany.AddOnIdentifier = “fill in your Add-On Identifier here”
lRetCode = oCompany.Connect()
'Check Return Code
If lRetCode <> 0 Then
'oCompany.GetLastError(lErrCode, sErrMsg)
End If
Dim oBP As SAPbobsCOM.BusinessPartners
'Dim lRetCode, lErrCode As Integer
'Dim sErrMsg As String
'Prepare empty oBP Object:
oBP = oCompany.GetBusinessObject(oBusinessPartners)
oBP.CardCode = "C08154711"
oBP.CardName = "James Tiberius Kirk"
oBP.CardType = cCustomer
'…
'Add the new BP to the database
lRetCode = oBP.Add()
If lRetCode <> 0 Then
oCompany.GetLastError(lErrCode, sErrMsg)
End If
End Sub
End Class
Thanks
Are you trying to add new BP or what? Please explain well.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.