on 06-21-2021 10:31 AM
I am using SAP Business One 9.2. I have a user defined table and I am using ADO.NET for executing sql query.
[code]
strQuery = "DELETE FROM [@U_RDLCH_ITEM_SERIAL] WHERE U_DC_No=10"
ExecuteQuery(strQuery)
[/code]
In the ExecuteQuery function , I have used ADO.NET for executing this query.Is there any way in sdk to execute such query ?
Hi dilipkumbhar,
Refer to the blog post for Guidelines for Modifying SAP Business One Data.
This should answer your question. It is ok for User Defined Tables (UDTs) of type [No Object & No Object with Auto. Increment] only.
Hope it helps!
Kind regards,
ANKIT CHAUHAN
SAP Business One Support
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Dear Aniket,
I want to execute update and delete queries on the user defined tables. Can I use oRecordSet.DoQuery method for executing such queries ?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi dilipkumbhar,
Recordset is a raw data access object that enables you to select data from the database, navigate through the result set, and manipulate user tables, which are not exposed by the DI API.
In SAP Business One SDK, you can use the Recordset object the following way:
SAPbobsCOM.Recordset oRecordSet = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.BoRecordset);
oRecordSet.DoQuery("select \"CardCode\", \"CardName\" from OCRD");
Hope it helps!
Kind regards,
ANKIT CHAUHAN
SAP Business One Support
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
107 | |
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.