Could not find file <table> in database <dbname> - Progress 4GL - openedge

I am facing one critical issue in production which is happening randomly. I compiled a. p along with custom tables. And also, respective triggers (WRITE) linked with particular tables in a database which will be fired when the tables get affected. Now the thing is the . r file is central, trigger files and custom df loaded in required site (Called site 1).
When I am executing the menu in other site below error I am getting. Note - For other site I cannot promote trigger files and load custom df as it is not needed..in a. p we have a condition to check. If the condition gets success, then only the logic I have written for custom tables get affected. In this scenario except site 1 none of the site the condition will not be satisfied. but I am not sure why am getting this error..do I need to load the df file and linke all trigger files to all the sites even though it is not required? or what is the issue
/global/mfgpro/opt/prod/global/fin/customcode/xxxx.r --Could not find file in database . (1494)

This error message should also generate a protrace. file in the working directory of the session that generated the message. That protrace should tell you what line number the error occurred on and how you got there.

Related

Why is object in AOT marked with red cross?

I have to extend report's query to add a new field.
I've created extension of a query, joined required datasources and can see new field in the list of fields.
For some reason the report in the AOT is displaying with red cross sign:
In properties i can see error in metadata: "There was an error reading metadata. Make sure the metadata xml file(s) are accessible, are well formed and are not corrupted with duplicate or missing xml elements.
The exception message is: Element named: 'Copy1' of type 'ModelElement' already exists among elements: 'Copy1'.
Parameter name: item
Additional information:
AOT/Reports/Reports/WHSInvent"
There is an .xml of that object in packages local directory, there are no any duplicate names in any node of that report.
Any ideas how it can be fixed?
I've run into this before and there are a two things that come to mind.
Often times it's due to an incorrect merge where changes are merged and metadata is accidentally duplicated (in your case it's possible there are two xml nodes with the same name/id in the .rdl file)
If this report is checked in with corrupt metadata, you need to manually modify the RDL file, which is not great, but hopefully the error contains enough hints. Open the report rdl file in your favourite editor (report likely located in a similar path as this: K:\AosService\PackagesLocalDirectory\YOURMODEL\Reports) and look for an xml node with an attribute Name="Copy1". With luck, you have two duplicate nodes next to each other due to the merge. Remove the offending duplicate node, save, and refresh the AOT in Visual Studio.
If the error is in your local changes only (xml file is corrupted for whatever reason) and you are sure that your source control contains the correct version and you simply wish to overwrite the local contents with the source controlled version, follow these steps. Note: this will overwrite local changes.
First, undo pending changes.
Then force a get latest:

Table methods not working anymore

I have a table with different methods, for example, one of them is validateWrite, when setting Field A to value X, Field B and C has to be filled in.
Suddenly (without changing code, I have compared the code with the test enviroment, it does work there) the validateWrite has stopped working.
I have tried to recompile the table, but that did not work.
Any idea why it suddenly (without making other modifications in this enviroment, or generating a CIL) stopped working and what i can try to solve it?
If some piece of code is calling table.doInsert(), it skips the validateWrite() method.
If the environments are truly identical, then I would try closing your AX client and deleting your user caches (see http://dynamics-ax-live.blogspot.com/2010/03/more-information-about-auc-file.html) where you delete all of the *.auc files located at C:\Users\[Username]\AppData\Local
In addition to what that tells you to delete, I'd also remove the *.kti file and all of the files & folders inside of C:\Users\[UserName]\AppData\Local\Microsoft\Dynamics Ax
Then open AX, see if the problem still exists. Then full system compile, CIL build, and delete your usage data.
The preferred route though would be to just drop a breakpoint in and debug the code to see what the execution stack is.

Qt::QTableWidget->setRowCount(0) crashes the application in release build?

I have a QTableWidget with 3 columns and 1000 rows (depends on the number of fetched items from the database ).
I also have a "Reload" Button to reload all the items from the database.
In "Reload" button, I want to delete all the rows from QTableWidget before loading items from the database.
Deleting all rows from the QTableWidget crashes the application when rowcount = 1.
I am using following logic to delete all the rows.
if( ui->tableWidget->rowCount() > 0)
{
ui->tableWidget->setRowCount(0);
}
also tried below logic
while (ui->tableWidget->rowCount() > 0)
{
ui->tableWidget->removeRow(0);
}
My application crashes using either of the logic when rowCount = 1.
It happens only when i build my application in release mode while it works fine in debug mode.
Can i get any idea why my application is getting crash.
I had the same problem, from one day to another it stopped working and I couldn't find what part of my code was making my program crash.
My program was used for reading files from a folder and uploading the file information into a QTableWidget, and I was also using cellWidgets for some information.
These are the problems that came to my mind, you should check that they're not happening to you:
The program was modifying the table all the time, so maybe i was trying to access an empty table. So I commented the lines where I was calling the table row and debugged it, but this wasn't a problem.
It could be a debugger problem, so I tried building it in Release and Profile mode, but still didn't work.
I could be having a problem when trying to access the cellWidget information, so I checked and I wasn't trying to access it.
Maybe the problem was when I was trying to eliminate a row that had a cellWidget, so I tried using ui->tableWidget->clearContents() before setting the row count to 0, (Didn't work)
After trying all of these I came upon this post. And basically I replaced setRowCount(0) with it's internal implementation ui->table->model()->removeRows(0,ui->table->rowCount());, debugged it and it worked.

Why creating model in any other location than client, meteor runtime throws exception?

I am a meteor newbie. I am trying out by building a simple app and it does nothing but shows list of items. I first tried out with hard coded model values in my client javascript code and it worked just fine. I then created a folder called 'model' under root of the application and created the model there like the following
Favorites = new Meteor.collection("favorites")
with this change, meteor throws exception pointing to this line of the file on load. If I move this code to client the code works ofcourse that is wrong. The full code is # https://github.com/ksunair/13favs It is a very simple solution has few files and less than 20 or 30 lines altogether. My client code is,
Template.favorites_main.helper({
favorites:Favorites
});
I did the following in order to clear your app of errors:
Favorites = new Meteor.Collection("favorites"); (Collection starts with a capital C)
I moved model/mainmodel.js to lib/mainmodel.js so Favorites would be available as soon as the template rendered. I always put my models under lib (or in a subdirectory) so they will be loaded first. This contradicts what I see in other places including discover meteor, so I'm unclear what the best practice is. In any case, it fixed the problem.
$ meteor add accounts-ui was needed because you referenced Accounts.ui.config.
You need to actually do a find in your favorites_main template. So it should look something like:
Template.favorites_main.helpers({
favorites: Favorites.find();
});

ASP.Net: How do I find this error?

I'm getting the following error when I try to run an ASP.Net page. It just popped up during development, and I don't know what the cause is.
"OverflowException Occurred. Value was either too large or too small for an Int32."
The line the debugger breaks on is of absolutely no help at all
Dim ApproxDate As TextBox = FormView1.FindControl("CurrentResultDateTextBox")
The error is occurring on this line because calling findControl on FormView1 causes it to databind (executes a SQL query to return the dataset). I assume the error lies somewhere in one of the object data sources or possibly one of the grid views on the page, but the debugger won't tell me where. Most of the page data sources are bound declaratively (specified in ASP tags in the source)
Pressing F11 to run past the exception displays the following:
"13712696100373320501120906 is not a valid value for Int32."
The value being shown here is the primary key for the main SQL table used by the page. There are about 10 data sources which use this field. Again, there's no indication of where exactly the error is occurring.
So how can I debug an error like this? Are there commands I can run? IIS error logs? 3rd party software to capture the error? I'll take anything I can get
Managed to find the problem. The trick is to first disable "just my code" in the IDE/Debug settings. Then you can see the system functions on the call stack, and while there is no source code, you can click on these functions to unwind the stack to one of the web controls (in this case the ListControl.PerformSelect function)
If you check the auto variables in the debug window, it will show the control involved in the error. From there I added a watch on the ID property to see which control it was, looked up the data source that feeds it, and found the error.
You can also unwind the stack to the ObjectDataSourceView, look at the dataTable property, and call GetErrors() to see the issues. This returns an array of data rows which are flagging errors; The property RowError will show the error message for any given row.

Resources