Skip to Content

Internal Error (6001) occured

Dear all,

I am trying to get data after selection of CFL.

I have custom form SAY "Work Order".

In that i have Vendor Code CFL. After Selection of CFL, i want to fetch ShiptoAdress of that corresponding Vendor.

Code:

((SAPbouiCOM.EditText)(oForm.Items.Item(pVal.ItemUID).Specific)).Value = val;//code ((SAPbouiCOM.EditText)(oForm.Items.Item(destControl).Specific)).Value = val1;//name

string Querry="select isnull([Address],'')+', '+ isnull(Street,'')+', '+isnull(Block,'')+ "+

" ', '+isnull(ZipCode,'') +', '+isnull(City,'') +', '+isnull([State],'') + "+

" ', '+isnull(Country,'') from CRD1 where CardCode='" + val + "' and AdresType='S' ";

SelectRec = ((SAPbobsCOM.Recordset)(oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.BoRecordset)));

SelectRec.DoQuery(Querry);

if (SelectRec.EoF == false) { str = SelectRec.Fields.Item(0).Value.ToString(); } ((SAPbouiCOM.EditText)(oForm.Items.Item("txtAddr").Specific)).Value =str ;//name
Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Apr 26, 2012 at 12:20 PM

    Put a break point on the statement just after where you load the field called querry with the sql stmt. Then copy the contents of that variable and paste into SQL Management Studio and run the statement from there. It should tell you whether the problem is with the syntax of the statement and will offer info about what is wrong.

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Dear Pravin,

      There may be two reasons for the above mentioned error

      First one is, may be you have created the user data source of edit text box with minimum length and you are trying to set the edit text box value with larger length (i.e. including Address, City and ZipCode etc...). So please create the edit text box with larger length using the code : oForm.DataSources.UserDataSources.Add("EdtDS", BoDataType.dt_LONG_TEXT).

      Second one is, try to set the edit text box value in try... catch block and don't write any code in catch block. It will set the text box value and at the same time the code will give the error but since you are writing the code in try... catch block it will not crash the whole application.

      Please let me know if the issue get resolved.

      Have a great day!

      Sincerely,

      Nitin

      ____________________

      Manager, SAP Business One

      Greytrix
      It's time to think outside the box.

      Email: sap@greytrix.com | Web: www.greytrix.com

      ____________________

      Development Partners for SAP B1

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.