on 10-29-2004 1:49 AM
Hi,
I just finished a small add on for a client and I need to create an installation program rto create the required UDF and UDT.
When, I use that code to create a UDT, it does not work. BTW, I'm using VB6
' Declaration of the variable
Dim oTable As SAPbobsCOM.UserTables
'Initialisation of the Meta object
oTable = oCompany.GetBusinessObject(oUserTables)
' Settings for the table 333
oTable.TableName = "TEST"
oTable.TableDescription = "Unit of Measure"
' Creation of the table
lRetCode = oTable.Add
If lRetCode <> 0 Then
Else
MsgBox ("Table TEST was added correctly")
End If
I don't understand why it does not work. I also tried to replace the second line by
oTable = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oUserTables) but without success.
Any idea?
Vincent
Try using the UserTablesMD class instead of the UserTables one. This is the one used to manage user defined tables.
Be carefull, becouse DI allows only one instance of a these kind of object.
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.
Hi,
My new VB 6 code is the following but it still does not work. The error is at the second line. 'Object variable not set'
Any idea now?
Vincent
Dim oUserTableMD As SAPbobsCOM.UserTablesMD
'Initialisation of the Meta object
oUserTableMD = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oUserTables)
' Settings for the table 333
oUserTableMD.TableName = "TEST"
oUserTableMD.TableDescription = "Unit of Measure"
' Creation of the table
lRetCode = oUserTableMD.Add
If lRetCode <> 0 Then
Else
MsgBox ("Table TEST was added correctly")
End If
Message was edited by: Vincent MOTTE
User | Count |
---|---|
97 | |
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.