error in the database struture. The error(1190 in module 19)

abnainas
Member Posts: 174
When i want to take a backup from dynamics NAV, this error appaers:
"There is an error in the database struture. The error (1190 in module 19)
may have been caused by the computer or a program.
Table: Item
Compny:
Key Fields: No."
Please advice
"There is an error in the database struture. The error (1190 in module 19)
may have been caused by the computer or a program.
Table: Item
Compny:
Key Fields: No."
Please advice
Ahmad Bani Naser
Dynamics NAV Developer
Dynamics NAV Developer
0
Comments
-
I have had the same errortext, once with error 1204 in module 19 and once with error 9 in module 50.
This has helped.
1. Make a copy of the database.
2. Export all data from table Item.
A simple dataport which dumps all fields except flowfields will do.
3. Delete all records with DELETEALL(FALSE).
4. Import the data.
You could use the same dataport.
Make sure that you don't use any triggers !Keep It Simple and Stupid (KISS), but never oversimplify.0 -
abnainas wrote:When i want to take a backup from dynamics NAV, this error appaers:
"There is an error in the database struture. The error (1190 in module 19)
may have been caused by the computer or a program.
Table: Item
Compny:
Key Fields: No."
Please advice
In most cases this error comes about because you have lower case characters in a CODE field. This can happen if you directly access the database (say though ODBC) and write data without making sure its the correct data type.
You need to figure out how the error occurred, by looking at any external connectivity you have.
Once you find the source, you need to fix the error by simply writing Navision code that converts the code from lower case to upper case.David Singleton0 -
Hello
I tried to solve the problem but i still hav a question.
Must i have a report that calculates the flowfield after
the Dataport? :-k
Thanks for answer and happy new year to everyone.
Martin0 -
Best wishes to you too, Martin.
???
You don't need to calculate the flowfields.
Since they are calculated when used, you don't want to (nor should you) export and import that data.Keep It Simple and Stupid (KISS), but never oversimplify.0 -
one more question i have is - how can i be sure that i dont use a trigger. A standard dataport works with insert TRUE or FALSE?
Regards Martin0 -
Set the data-item properties AutoSave, AutoUpdate and AutoReplace to No. This way you can handle things yourself.
Then use C/AL-code in de trigger OnAfterImportRecord: INSERT(FALSE)
The property CallFieldValidate of the Dataport Fields is default No, which is what you want in this situation. Don't change those.
Good luck.Keep It Simple and Stupid (KISS), but never oversimplify.0 -
Thanks a lot to fverkel
.. it makes me a little nervous that you wish me luck 8-[
but i will try it.
Regards Martin0 -
I encounter today the same problem and I have developed this:
tbfield.SETRANGE(TableNo,[b]23[/b]); tbfield.SETRANGE(Type,tbfield.Type::Code); RRRec.GETTABLE([b]tbvendor[/b]); dlgwindow.OPEN(txcwindow); IF tbfield.('-') THEN BEGIN REPEAT dlgwindow.UPDATE(1,tbfield.FieldName); IF RRRec.('-') THEN BEGIN REPEAT FRField := RRRec.FIELD(tbfield."No."); IF FORMAT(FRField.VALUE) <> (UPPERCASE(FORMAT(FRField.VALUE))) THEN BEGIN FRField.VALUE := (UPPERCASE(FORMAT(FRField.VALUE))); RRRec.MODIFY; END; UNTIL RRRec.NEXT = 0; END; UNTIL tbfield.NEXT = 0; END; dlgwindow.CLOSE
It's slow and only a prototype...I will explain it when I can...now I'm busy as you can imagine
Well...
RRRec ->recordref
FRField -> fieldref
TBField -> table "Field"
code in bold -> it's fixed: you must change it according to the table you want to change: in this case table 23: Vendor
sorry...are there recref and fieldref in 2.60? I don't remember....0 -
[Topic moved from Navision forum to Navision Tips & Tricks forum]
The code of Belias can be useful to resolve the problem.Regards,Alain Krikilion
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!0 -
That's great solution using recref. =D>0
-
Hello Everybody
i also find a solution of my problem. It 's a little different.
I wirte a Dataport and read al data from the table. Settings in
the Dataport were Autoupdate - No and Autoreplace - No. Then i
tried to read the txt-file into the table and it crashes different times.
A copy of the txt/file i opend in EXCEL and there i see that some of the
CODE-Fields had two " CR/LF ". That were the fault and i can correct it
directly in the Itemmask.
Now the database is Ok. The error were because some users copy and paste complete Cells from EXCEL into the Field.
Thanks everybody
Martin0 -
Thx Ara3n
As the code is now in tips&tricks, I have to confirm you that i tested the code (used for a dozen tables) ant it works fine (slow indeed, but better than modify data in sql, writing and writing queries)...and this is the complete objectOBJECT Codeunit 99999 Correct lowcase Codes { OBJECT-PROPERTIES { Date=23/01/08; Time=15.25.41; Modified=Yes; Version List=; } PROPERTIES { OnRun=BEGIN //In this instruction: "TBField.SETRANGE(TableNo,3)" the tableno must match the table no of the variable TBTableToFix //I put Code "3" because is the first table. Replace it with whatever you want TBField.SETRANGE(TableNo,3); TBField.SETRANGE(Type,TBField.Type::Code); RRRec.GETTABLE(TBTableToFix); DLGWindow.OPEN(TXCWindow); IF TBField.FINDSET THEN BEGIN REPEAT DLGWindow.UPDATE(1,TBField.FieldName); IF RRRec.FINDSET THEN BEGIN REPEAT FRField := RRRec.FIELD(TBField."No."); IF FORMAT(FRField.VALUE) <> (UPPERCASE(FORMAT(FRField.VALUE))) THEN BEGIN FRField.VALUE := (UPPERCASE(FORMAT(FRField.VALUE))); RRRec.MODIFY; END; UNTIL RRRec.NEXT = 0; END; UNTIL TBField.NEXT = 0; END; DLGWindow.CLOSE END; } CODE { VAR TBField@1130000 : Record 2000000041; RRRec@1130001 : RecordRef; FRField@1130002 : FieldRef; TBTableToFix@1130003 : Record 3; DLGWindow@1130004 : Dialog; TXCWindow@1130005 : TextConst 'ENU=Field #1##################################;ITA=Campo #1##################################'; BEGIN END. } }
enjoy! 8)0 -
Hi Guys,
Thought i would dig this thread up from last year, I'm "fortunate" enough to have a database with this problem (lowercase letter in code field) due to an external tool modifying records through ODBC. I have tried using the tool below to fix the issue but it just continues to generate the same "The X Table contains a value in a Code field that cannot be used with Microsoft Dynamics NAV" error message. Is there some trick to get the tool to work that i'm missing, or is it restricted to only work in C/Side or certain versions of NAV?
Any help would be much appreciated!0 -
Belias wrote:Are you sure that the problem is lowercase in a code field and not something else? (e.g. excel CRLF?)
The tool solves ONLY lowercase/Code problems, not "strange" characters.
I was testing with the above code in a demo database where i just modified a record using SQL Management Studio (changed the "Search Description" on an Item to include a lower case character), and was not able to get it to work, it would complain about that one record when it ran the 'UNTIL RRRec.NEXT = 0' line of code which was retrieving the broken record. So no "strange" characters were stopping it from working, it was just a lowercase value in a code field.
I turned on the debugger and noticed that it had at least loaded the first couple of values into the RecordRef variable, however it still contained the values from the previous record in the "Search Description" field, and if my memory is correct, all other fields after the "Search Description' were from the previous record.
:?:0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions