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

How to remove datasource

Hi Experts

For example, I add a datasource in DBDataSources as below:

form.DataSources.DBDataSources.Add("mydatasource", SAPbouiCOM.BoDataType.dt_SHORT_TEXT)

Now I would like to add a same name datasource into UserDataSources:

form.DataSources.UserDataSources.Add("mydatasource", SAPbouiCOM.BoDataType.dt_SHORT_TEXT)

So I need to remove the previous one from DBDataSources, do you know how to do this?

Thanks

Tim

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • author's profile photo Former Member
    Former Member
    Posted on Oct 12, 2010 at 07:10 AM

    Hi,

    doesn't make sense to me.. why do you want to use the same name twice?

    DBDataSources.Add("TABLENAME")
    UserDataSources.Add("UniqueID", type, length)

    Therefore please clarify if your code is correct.

    Regards

    Sebastian

    Add a comment
    10|10000 characters needed characters exceeded

    • Hi Tim,

      I don't believe you can delete a datasource from a form once it has been added. The only thing you can do is close the form and reopen it.

      As Sebastian has mentioned, it isn't typically required to make changes to the datasource definitions once they have been set. What are you trying to achieve?

      Kind Regards,

      Owen

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.