Native DB rename causes internal error 1355 in module 19

cdstudecdstude Member Posts: 16
The client has a 33 GB native database with mulitple companies. The database has 36% free space (it is 50GB) and is a single file. I am using a NAV report to do the rename and connecting the client directly to the database (no server). Object Cache is 1GB and DBMS Cache (?) is 550000. Client is 5.0 SP1 and DB is 4.0 SP3

The G/L Account needs to be renamed from 999, 1000, 2000,...,99999 to 0099,01000,02000,...99999 for the SQL conversion.

My report has three lines in the G/L Account data item (indented underneath a Company with IF COMPANYNAME <> Name THEN CHANGECOMPANY(Name))
:
IF STRLEN("No.") < 5 THEN
RENAME(PADSTR('', 5 - STRLEN("No."), '0') + "No.");
COMMIT;

If the G/L Account No. is already 5 characters it is skipped.

After the 1st commit then I get the Internal Error 1355 in Module 19 which I belive implies I don't have enough resources or the database mgr is getting the same request twice? How to get the rename to work successfully? I am running with a commit so that I don't cause an error with no space left...

Comments

  • rhpntrhpnt Member Posts: 688
    Is the G/L Account table setup as "per company"? If not, then set it that way and run the renamig function in each company separately (without the "changecompany" part).
  • cdstudecdstude Member Posts: 16
    G/L Account table property: DataPerCompany <Yes>
  • FDickschatFDickschat Member Posts: 380
    I think this is causing the error:
    IF COMPANYNAME <> Name THEN CHANGECOMPANY(Name)

    You are using G/LAccount.Name in the changecompany. This must read
    GLAccount.CHANGECOMPANY(Company.Name)

    Additionally you should not use the If. This would only work if the company you use as the starting point is the first company in the list.

    Just do a changecompany without the If.
    Frank Dickschat
    FD Consulting
  • cdstudecdstude Member Posts: 16
    FDickschat wrote:
    I think this is causing the error:
    IF COMPANYNAME <> Name THEN CHANGECOMPANY(Name)

    You are using G/LAccount.Name in the changecompany. This must read
    GLAccount.CHANGECOMPANY(Company.Name)

    Additionally you should not use the If. This would only work if the company you use as the starting point is the first company in the list.

    Just do a changecompany without the If.

    Yep - that worked! Thanks!!!
Sign In or Register to comment.