Can temptables set filters in a case-in sensitive way

kabrocokabroco Member Posts: 111
Hello everybody,

I want to ask you a question about using an SQL database and case-sensitive or case-insensitive collation.
In the database setup the collation is case-insensitive. (NAVclassic 6.01)
([file]- [database]- [alter] tab [collation])

In the customer sales history form (form 7174) you can find this function:

IsFirstDocLine() : Boolean
TempSalesInvLine.RESET;
TempSalesInvLine.COPYFILTERS(Rec);
TempSalesInvLine.SETRANGE("Document No.","Document No.");
IF NOT TempSalesInvLine.FIND('-') THEN BEGIN
SalesInvLine.COPYFILTERS(Rec);
SalesInvLine.SETRANGE("Document No.","Document No.");
SalesInvLine.FIND('-');
TempSalesInvLine := SalesInvLine;
TempSalesInvLine.INSERT;
END;
EXIT("Line No." = TempSalesInvLine."Line No.");

Standing in posted invoices on form customer sales history:
When I filter the records in the description field my records with F7 on *Kabel* then the result is also records with “kabel” an 'Kabel'. But when I want to press the line with the ‘kabel’ in the description (or even more early), you get an error:
“ The sales invoice line already exists.
Identification fields an values:
Document No. = 980013, Line No. = 10000.”
Using the debugger shows that there is a selection on Kabel and that in the tempSalesInvoiceLine it is not found (it is a ‘kabel-line’). And then inserted for the second time, which results in the error.

Can temptables set filters in a case-in sensitive way?

Comments

  • David_SingletonDavid_Singleton Member Posts: 5,479
    Can't you use

    @*kabel*

    ?
    David Singleton
  • kabrocokabroco Member Posts: 111
    Yes, I can, and it works properly, but it is in most other screens in nav not neccessary to do this.
    And second, when not using the @ the screen closes, so it is 'abnormal behavior' for Nav compared with the other forms. And I want to know why.

    In our testdatabase is the collation is case-sensitive. (NAVclassic 6.01)
    ([file]- [database]- [alter] tab [collation])
    There does the error not occur.
Sign In or Register to comment.