Skip to Content
author's profile photo Former Member
Former Member

SDK VB recordset

Alguien puede ayudarme ... necesito saber como puedo poner un campo en el codigo sql como parametro

--------------------

Someone can help me ... I need to know how I can put a field in SQL as parameter

sql = "Select CardName from OCRD where CardCode='" & {param} & "'"

oRecordSet = SBO_Company.GetBusinessObject(SAPbobsCOM.BoObjectTypes.BoRecordset)

oRecordSet.DoQuery(sql)

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • author's profile photo Former Member
    Former Member
    Posted on Oct 15, 2015 at 12:35 PM

    Hi,

    I think there's nothing wrong in your query. In VB I'm using like

    oQry = "SELECT CardCode, CardName FROM OCRD WHERE CardCode = '" & txt_Code.Value & "' "

    txt_Code is a EditTextBox.

    oRecordSet = SBO_Company.GetBusinessObject(SAPbobsCOM.BoObjectTypes.BoRecordset)

    oRecordSet.DoQuery(oQry)

    Regards,

    Bry

    Blog: http://www.sap-tips-tricks.com/

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.