RE: [development-axapta] SQL sync error

2005-07-20 Thread James Flavell




Thanks Dilip,

What you say is mostly correct see what I found out (important point is who
the owner of the view is):

It seems this error is because the view called 'VIEWS' in the master DB of
my SQL has the owner as 'dbo' and not 'Information_SCHEMA'.

I think maybe at some point I accidental ran the change owner script on the
master db rather than the Ax DB Now I just need to find a way to set
back the right views etc to the right user...or otherwise reinstall SQL
(since I don't have a backup of master before the change owner happened)

Thanks

James

-Original Message-
From: development-axapta@yahoogroups.com
[mailto:[EMAIL PROTECTED] On Behalf Of Dilip N
Sent: 19 July 2005 20:54
To: development-axapta@yahoogroups.com
Subject: Re: [development-axapta] SQL sync error


Information_schema.views is a system view which resides in master database.
First step, you just check whether this view is present in the location by
expanding master database-VIews, Nextly, you check if proper permissions
like dbo is the owner of the view..I believe it might be corrupted. or if
you have another sql server hosted, just try using that copy of master
database..maybe backup this master db and restore the other master db..

Good luck :-)

James Flavell [EMAIL PROTECTED] wrote:
Can anyone tell me anything about INFORMATION_SCHEMA.VIEWS in SQL ...I get
teh following error messages when I try to sync Axapta.

I guess I am missing this view or table and so the system gets stuck but
where shoul dthis view be? In the Ax DB or the master DB or where?

I hope someone can help as I am not able to do any sync to my databases
because of this...
Thanks
James

Error given during sync:

Cannot execute the required database operation.,The SQL database has issued
an error.
SQL error description: [Microsoft][ODBC SQL Server Driver][SQL
Server]Invalid object name 'INFORMATION_SCHEMA.VIEWS'.
SQL statement: IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS
WHERE TABLE_NAME = 'LEDGERBALANCES') DROP VIEW LEDGERBALANCES
Cannot execute the required database operation.,The SQL database has issued
an error.
SQL error description: [Microsoft][ODBC SQL Server Driver][SQL
Server]Invalid object name 'INFORMATION_SCHEMA.VIEWS'.
SQL statement: IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS
WHERE TABLE_NAME = 'LEDGERBALANCESDIM') DROP VIEW LEDGERBALANCESDIM
Cannot execute the required database operation.,The SQL database has issued
an error.
SQL error description: [Microsoft][ODBC SQL Server Driver][SQL
Server]Invalid object name 'INFORMATION_SCHEMA.VIEWS'.
SQL statement: IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS
WHERE TABLE_NAME = 'BMRUNUSERSPERLINES') DROP VIEW BMRUNUSERSPERLINES
Cannot execute the required database operation.,The SQL database has issued
an error.
SQL error description: [Microsoft][ODBC SQL Server Driver][SQL
Server]Invalid object name 'INFORMATION_SCHEMA.VIEWS'.
SQL statement: IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS
WHERE TABLE_NAME = 'BMUSERSCRIPTTIMINGAGG') DROP VIEW BMUSERSCRIPTTIMINGAGG
Cannot execute the required database operation.,The SQL database has issued
an error.
SQL error description: [Microsoft][ODBC SQL Server Driver][SQL
Server]Invalid object name 'INFORMATION_SCHEMA.VIEWS'.
SQL statement: IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS
WHERE TABLE_NAME = 'BMRUNSTEPSPREADING') DROP VIEW BMRUNSTEPSPREADING
Cannot execute the required database operation.,The SQL database has issued
an error.
SQL error description: [Microsoft][ODBC SQL Server Driver][SQL
Server]Invalid object name 'INFORMATION_SCHEMA.VIEWS'.
SQL statement: IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS
WHERE TABLE_NAME = 'BMSCRIPTSTEP') DROP VIEW BMSCRIPTSTEP
Cannot execute the required database operation.,The SQL database has issued
an error.
SQL error description: [Microsoft][ODBC SQL Server Driver][SQL
Server]Invalid object name 'INFORMATION_SCHEMA.VIEWS'.
SQL statement: IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS
WHERE TABLE_NAME = 'LEDGERVENDPAYMPROPOSAL') DROP VIEW
LEDGERVENDPAYMPROPOSAL
Cannot execute the required database operation.,The SQL database has issued
an error.
SQL error description: [Microsoft][ODBC SQL Server Driver][SQL
Server]Invalid object name 'INFORMATION_SCHEMA.VIEWS'.
SQL statement: IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS
WHERE TABLE_NAME = 'LEDGERCUSTPAYMPROPOSAL') DROP VIEW
LEDGERCUSTPAYMPROPOSAL
Cannot execute the required database operation.,The SQL database has issued
an error.
SQL error description: [Microsoft][ODBC SQL Server Driver][SQL
Server]Invalid object name 'INFORMATION_SCHEMA.VIEWS'.
SQL statement: IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS
WHERE TABLE_NAME = 'CUSTVIEW') DROP VIEW CUSTVIEW
Cannot execute the required database operation.,The SQL database has issued
an error.
SQL error description: [Microsoft][ODBC SQL Server Driver][SQL
Server]Invalid object name 

[development-axapta] Problem with Planned Purchase Orders

2005-07-20 Thread markus_sendelbach




Dear All,

I have a problem and I don´t find any solution for it. Can anybody 
help me?

I have to show only these records in Planned Purchase Orders, 
where the sum of Available physical Qty in all other Warehouses 
are greater than the Required Qty.

My first solution was to build up the Select-Join-Statement, insert 
all concerned records to a RecordSorted List, set the DataSource 
ReqTransPO as temp and afterwards insert all records from the 
RecordSorted List to ReqPO.
That doens't work, I got an SQL-Error. 
I think the problem is, that after setting the ReqTransPO as temp, 
the Data is only available on the Client?

My second solution was to build up the Select-Join-Statement in the 
executeSection() of ReqPO.
That does't work either, because it seems that I loose all Innner-
Join relations (ReqTrans, InventTable).
I think the problem is that I do not get the complete Record with 
the below Select-Join-Statement.

Here is the mentioned Select-Join-Statement:
 select reqPO
 group by ReqPlanId, ItemId, RecId
 join sum(AvailPhysical) from InventSum
 where inventSum.ItemId == reqPO.ItemId 
 inventSum.AvailPhysical = reqPO.Qty
 join covInventDim
 where covInventDim.inventDimId == 
reqPO.CovInventDimId
 exists join inventDim_Location
 where inventDim_Location.InventLocationId != 
covInventDim.InventLocationId;


Mit freundlichen Grüssen / Best Regards

Markus Sendelbach








  




  
  
  YAHOO! GROUPS LINKS



  Visit your group "development-axapta" on the web.
  To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
  Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.



  









[development-axapta] Lot ID and Trace Functionality in Axapta

2005-07-20 Thread sri ram




Hi,

I am preparing for TradeLogistics exam and I am unable to find the
functionality of LOTID in Axapta. As I can see them in some of the
forms and i can't see them in some of them.

I also wanted to know about the Trace functionality in Axapta nad the
LOTID mechanism on Axapta.

It would be great if you could help me with with
documents/comments/pointers regarding the same.

Thanking you.

Regards
Sri Ram








  
  
SPONSORED LINKS
  
  
  

Computer part
  
  
Programming languages
  
  
Microsoft axapta
  
  


Support exchange
  

   
  







  
  
  YAHOO! GROUPS LINKS



  Visit your group "development-axapta" on the web.
  To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
  Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.



  









[development-axapta] Re: [Axapta-Knowledge-Village] Sales Order and Production Order Inventory Update

2005-07-20 Thread AikChongOOi






--- AikChongOOi [EMAIL PROTECTED] wrote:

 Hi there,
 
 Would like to have your guys expertise on the
 following customizations done in Axapta. 
 
 I have a BOM Item A with the Inventory Dimension
 storage dimension setup as WarehOuse (Primary
 Stocking), batch Id and serial Id. 
 
 Well this is the example creation of the sales
 order.
 (The sales order level does not show the detail of
 the
 sublots created. However the production order will
 have the details of the sublots manufactured from
 the
 production floor.)
 
 Item A 10 K. 
 WareHouse (FG) 
 BatchId= Empty 
 serialId = Empty
 
 we have the production order created after the Sales
 order creation to fulfill the demand of the order.
 
 Item A Started Qty of 10
 WareHouse (FG) 
 BatchId= Empty 
 serialId = Empty
 
 There will have number of report as finished
 journals
 created based on the number of sublots produced.
 
 Report as finished journals:
 SublotA - 3 K
 BatchId = BB, SerialId = SublotA
 
 SublotB - 3 K
 BatchId = BB, SerialId = SublotB
 
 SublotC - 2 K
 BatchId = BB, SerialId = SublotC
 
 So when i post the report as finished journal, how
 would be the inventory transaction update for my
 sales
 order and production order (Issue VS Receipt
 transactions) in Axapta?
 
 How can i pack based on the above number of sublots
 produced from my sales order above? since my sales
 order does not create number of sublots order line
 respectively.
 
 Would Axapta manage to handle the above scenario?
 
 Pls your input on these and sharing are very much
 appreciated. As i have been encountered many issues
 on
 the inventory update.
 
 thanks,
 
 
 rgds,
 AC Ooi
 
 
   
 
 Start your day with Yahoo! - make it your home page 
 http://www.yahoo.com/r/hs 
 
 



  

Start your day with Yahoo! - make it your home page 
http://www.yahoo.com/r/hs 
 





  




  
  
  YAHOO! GROUPS LINKS



  Visit your group "development-axapta" on the web.
  To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
  Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.



  









[development-axapta] Help on Serial Numbers

2005-07-20 Thread sri ram




Hi,

I wanted to give a serial number manually for each of the items
purchased. So I have made the following steps

1. Made Serial number primary and active in the item dimension group.
2. Created a PO and attached a serial number for the PO

But I am facing the problem that the Serial Number is assigned to all
the items for a particular PO line.

Plase help me on how to make the assignment of Serial Numbers for each
of the items on a manual basis during PO picking list generation.

I would be great if you can help me with documents/comments/pointers.

Thanking you.

Regards
Sri Ram








  
  
SPONSORED LINKS
  
  
  

Computer part
  
  
Programming languages
  
  
Microsoft axapta
  
  


Support exchange
  

   
  







  
  
  YAHOO! GROUPS LINKS



  Visit your group "development-axapta" on the web.
  To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
  Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.



  









RE: [development-axapta] Enterprise Portal

2005-07-20 Thread Malcolm Burtt




Hi
 
I have the web site settings entered like this.
 
 Server Name: myportal.mycompany.co.uk
 Web URL: http://myportal.mycompany.co.uk
 Server library: D:\Axapta\Enterprise Portals\Axapta Portal
 Directory: \\GLOBAL2\\D$\Axapta\Enterprise Portals\Axapta
Portal
 
The server library and directory are pointing at the root folder of my
web site.
 
Anyone got any more suggestions? This is driving me nuts. :-)
 
Regards
 
Malcolm.

 _ 

From: development-axapta@yahoogroups.com
[mailto:[EMAIL PROTECTED] On Behalf Of Meyyappan
Meenakshi Sundaram
Sent: 19 July 2005 19:52
To: development-axapta@yahoogroups.com
Subject: RE: [development-axapta] Enterprise Portal


In the web site tab , make sure the server library and directory is
pointing 
to the root folder of the web site.

Thanks
Mey



From: Malcolm Burtt [EMAIL PROTECTED]
Reply-To: development-axapta@yahoogroups.com
To: Axapta Yahoo Group development-axapta@yahoogroups.com
Subject: [development-axapta] Enterprise Portal
Date: Tue, 19 Jul 2005 09:17:13 +0100

Hi all

I'm trying to set up Enterprise Portal as a standalone site on IIS
(i.e.
not as a sub-directory of the default site). When EP is configured to
run as a virtual directory on the default site it all works fine, but
if
I run it as a standalone site then I get a blank web page with the
following HTML source...

 SCRIPT Language=_javascript_
 function URLEncode(Tx)
 {
 return escape(Tx);
 }
 /SCRIPT
 HTML
 link REL=stylesheet TYPE=text/css
HREF="">
 link REL=stylesheet TYPE=text/css
HREF="">
 /HTML

Has anyone got any thoughts on what I might be doing wrong?

Thanks in advance...

Malcolm Burtt
Global IT Group
Business Solutions designed for YOUR business processes
Global IT Group is the trading name of Touchstone Global Business
Solutions Ltd. and is part of the Touchstone Group PLC.




[Non-text portions of this message have been removed]










 _ 

YAHOO! GROUPS LINKS 


 
*  Visit your group development-axapta
http://groups.yahoo.com/group/development-axapta  on the web.
  
*  To unsubscribe from this group, send an email to:
  [EMAIL PROTECTED]
mailto:[EMAIL PROTECTED]
be 
  
*  Your use of Yahoo! Groups is subject to the Yahoo! Terms of
Service http://docs.yahoo.com/info/terms/ . 


 _ 




[Non-text portions of this message have been removed]









  
  
SPONSORED LINKS
  
  
  

Computer part
  
  
Programming languages
  
  
Microsoft axapta
  
  


Support exchange
  

   
  







  
  
  YAHOO! GROUPS LINKS



  Visit your group "development-axapta" on the web.
  To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
  Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.



  









RE: [development-axapta] Help on Serial Numbers

2005-07-20 Thread Rolf Olsen




Hi,

Use the function Registration on the Purchase order line (under the
button inventory on the PO. Form).

There you can create the serial numbers per item before you post the
order. 

// Rolf

-Original Message-
From: development-axapta@yahoogroups.com
[mailto:[EMAIL PROTECTED] On Behalf Of sri ram
Sent: 20. juli 2005 05:45
To: Axapta-Knowledge-Village@yahoogroups.com;
Axapta_Documentation@yahoogroups.com; development-axapta@yahoogroups.com
Subject: [development-axapta] Help on Serial Numbers

Hi,

I wanted to give a serial number manually for each of the items
purchased. So I have made the following steps

1. Made Serial number primary and active in the item dimension group.
2. Created a PO and attached a serial number for the PO

But I am facing the problem that the Serial Number is assigned to all
the items for a particular PO line.

Plase help me on how to make the assignment of Serial Numbers for each
of the items on a manual basis during PO picking list generation.

I would be great if you can help me with documents/comments/pointers.

Thanking you.

Regards
Sri Ram




 
Yahoo! Groups Links



 








  




  
  
  YAHOO! GROUPS LINKS



  Visit your group "development-axapta" on the web.
  To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
  Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.



  









[development-axapta] Out Of Memory Error

2005-07-20 Thread axapta123456




I get the SmartHeap Out of Memory error when trying to import and 
post individual sales orders from an external system.

The outline of the process is as follows:

Class1: A batchable class

static void main(Args args)
{
 Class1 class1;
 boolean importRunning = true;
 ;

 class1 = class1::construct();
 
 if(class1.prompt())
 { 
 while (importRunning)
 {
 importRunning = class1.runImport();
 class1.Finalize();
 class1 = class1::construct();
 }
 } 
}

The class1.runImport() runs through an external file and for each 
line in the external file creates a container that is packed and send 
to a static method in Class2, that will import and post the external 
file line:

convertedCon = this.convertToPackedObject(con);
convertedCon = this.pack();
returnImportAndPost = Class2::importAndPost(convertedCon);

Class2: Import and Post one line in the file

static container importAndPost(container invoiceDetailValues)
{
 #define.CurrentVersion(5)

 Class2 class2 = new Class2();
 ;

 class2.unpack(invoiceDetailValues);
 class2 = class2.getPostedDate();

 invoiceDetailValues = connull();
 validAccounntType = invoiceDetail.validateAccountType();

 if (validAccounntType)
 {
 ttsbegin;
 // Import an invoce detail line
 toPostSalesId = class2.Import(invoiceDate);

 // If the import returns a blank sales ID, the import failed
 if (toPostSalesId != )
 posted = class2.Post(toPostSalesId, invoiceDate);
 ttscommit;
 }
 else
 {
 // The invoice detail line does not have a valid account type
 returnvalues = class2.populateReturnContainer(false, 
toPostSalesId, invoiceDate, 0.00, class2.getErrorMessage());
 class2.Finalize();
 return returnvalues;
 }

 returnvalues = class2.populateReturnContainer(posted, 
toPostSalesId, invoiceDate, class2.getTotalCharges(), 
class2.getErrorMessage());
 class2.Finalize();
 return returnvalues;
}

Both Class1 and Class2 contains the following localmacros and pack() 
and unpack():

 #define.CurrentVersion(5)

 #localmacro.CurrentList1
 a1,
 a2,
 //... 26 elements
 a48
 #endmacro

 #localmacro.CurrentList2
 b1,
 b2,
 //... 18 elements
 b48
 #endmacro

 #localmacro.CurrentList3
 c1,
 c2,
 //... 41 elements
 c48
 #endmacro

 public container pack()
 {
 return [#CurrentVersion,
 [#CurrentList1],
 [#CurrentList2],
 [#CurrentList3]];
 }

 public boolean unpack(container packedClass)
 {
 int version = runbase::getVersion(packedClass);
 Container con;
 Container con1;
 Container con2;
 Container con3;

 switch (version)
 {
 case #CurrentVersion:
 [version,con1,con2,con3,con] =packedClass;
 [#CurrentList1] = con1;
 [#CurrentList2] = con2;
 [#CurrentList3] = con3;
 return true;
 default : return false;
 } 

 return false;
 }


Each external file contains 1000 lines to be imported and posted.
Batching is implemented in the class1.runImport() method and the 
batches has a size of 100. 
The memory error occurs approximately after 3 files.
The transaction in the Class2::importAndPost method is the only 
transaction used in the process.
The Finalize() methods in Class1 and Class2 are empty.
The SmartHeapMemorySizeUp() has been tested and does not resolve the 
out of memory error.











  
  
SPONSORED LINKS
  
  
  

Computer part
  
  
Programming languages
  
  
Microsoft axapta
  
  


Support exchange
  

   
  







  
  
  YAHOO! GROUPS LINKS



  Visit your group "development-axapta" on the web.
  To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
  Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.



  









Ant: [development-axapta] Problem with Planned Purchase Orders

2005-07-20 Thread Hans-Walter Bous




Hi Markus,
why don't you use a little trick:
Set the warenhouses as to refilling (main warehouse). Then you'll get
- transfer proposals for the warehouses to refill
- one purchase proposal for the main warehouse.
Maybe this will make things easier.
Good luck
John
markus_sendelbach [EMAIL PROTECTED] schrieb:
Dear All,

I have a problem and I don´t find any solution for it. Can anybody 
help me?

I have to show only these records in Planned Purchase Orders, 
where the sum of Available physical Qty in all other Warehouses 
are greater than the Required Qty.

My first solution was to build up the Select-Join-Statement, insert 
all concerned records to a RecordSorted List, set the DataSource 
ReqTransPO as temp and afterwards insert all records from the 
RecordSorted List to ReqPO.
That doens't work, I got an SQL-Error. 
I think the problem is, that after setting the ReqTransPO as temp, 
the Data is only available on the Client?

My second solution was to build up the Select-Join-Statement in the 
executeSection() of ReqPO.
That does't work either, because it seems that I loose all Innner-
Join relations (ReqTrans, InventTable).
I think the problem is that I do not get the complete Record with 
the below Select-Join-Statement.

Here is the mentioned Select-Join-Statement:
 select reqPO
 group by ReqPlanId, ItemId, RecId
 join sum(AvailPhysical) from InventSum
 where inventSum.ItemId == reqPO.ItemId 
 inventSum.AvailPhysical = reqPO.Qty
 join covInventDim
 where covInventDim.inventDimId == 
reqPO.CovInventDimId
 exists join inventDim_Location
 where inventDim_Location.InventLocationId != 
covInventDim.InventLocationId;


Mit freundlichen Grüssen / Best Regards

Markus Sendelbach







-
YAHOO! GROUPS LINKS 


 Visit your group development-axapta on the web.
 
 To unsubscribe from this group, send an email to:
 [EMAIL PROTECTED]
 
 Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service. 


-




H.W. Bous

  
-
Gesendet von Yahoo! Mail - Jetzt mit 1GB kostenlosem Speicher

[Non-text portions of this message have been removed]




  




  
  
  YAHOO! GROUPS LINKS



  Visit your group "development-axapta" on the web.
  To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
  Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.



  









[development-axapta] Changing Form Layout

2005-07-20 Thread Chwaszczewski, Jim




I have a client that wants to change form layout in 3.0 based on the
user group the user is assigned to. Any thoughts about how to approach
this? Thanks for your thoughts.


Jim Chwaszczewski
JChwaszczewski @ wipfli . com 
 

 
The content of this E-mail and any attached files is confidential, and may be subject 
to certain privilege. This E-mail is intended for the designated recipient(s) only. 
If you have received this E-mail in error, please immediately contact the sender. 
 
WIPFLI LLP 
Business experts. Right from the start. 
 
 
 








  
  
SPONSORED LINKS
  
  
  

Computer part
  
  
Programming languages
  
  
Microsoft axapta
  
  


Support exchange
  

   
  







  
  
  YAHOO! GROUPS LINKS



  Visit your group "development-axapta" on the web.
  To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
  Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.



  









[development-axapta] [Urgent] Rename Primary Key doesn't work for purchase order

2005-07-20 Thread Cenk Ince




Hi all;

When i rename purchid of a PO it doesn't rename it. But for other primary keys like Salesid or itemid it works well. Second when i do this operation with partner license it works for purchid to. I doesn't work for our customer license.

Does anybody know how to solve this problem why can it happen?

 



[Non-text portions of this message have been removed]









  
  
SPONSORED LINKS
  
  
  

Computer part
  
  
Programming languages
  
  
Microsoft axapta
  
  


Support exchange
  

   
  







  
  
  YAHOO! GROUPS LINKS



  Visit your group "development-axapta" on the web.
  To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
  Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.



  









RE: [development-axapta] Out Of Memory Error

2005-07-20 Thread Bruno Max Sørensen




Hi
 
The code below is taken from the Global class in Ax 3.0 SP4. It might cure
your problem
 
static void SmartHeapMemorySizeUp(boolean _silent = true)
{
 HeapCheck hc;
 int i, pageSize, newPageSize, physMem, minPageSize;
 Container memStatus;
 ;
 
 memStatus = WinApi::getMemoryStatus();
 physMem = conpeek(memStatus,3)/1024/1024;
 minPageSize = min(32768,physMem * 32);
 setprefix(funcName());
 if (!_silent)
 {
 info(strfmt(Physical Memory = %1 MB, physMem));
 info(strfmt(Minimum page size = %1 Bytes, minPageSize));
 }
 
 hc = new HeapCheck();
 i = hc.poolCount();
 while (i0)
 {
 setprefix(strfmt(Pool no = %1, i));
 if (!_silent)
 {
 info(strfmt(FixedBlockSize = %1, hc.fixedBlockSize(i)));
 info(strfmt(SmallBlockSize = %1, hc.smallBlockSize(i)));
 }
 
 pageSize = hc.pageSize(i);
 newPageSize = pageSize;
 while (newPageSize  minPageSize)
 {
 newPageSize = 2 * newPageSize;
 }
 if (!_silent)
 {
 info(strfmt(Old PageSize = %1, pageSize));
 info(strfmt(New PageSize = %1, newPageSize));
 }
 
 hc.pageSize( i, newPageSize );
 i--;
 }
}
 
Kind regards
Bruno

 _ 

From: development-axapta@yahoogroups.com
[mailto:[EMAIL PROTECTED] On Behalf Of axapta123456
Sent: 20. juli 2005 12:00
To: development-axapta@yahoogroups.com
Subject: [development-axapta] Out Of Memory Error


I get the SmartHeap Out of Memory error when trying to import and 
post individual sales orders from an external system.

The outline of the process is as follows:

Class1: A batchable class

static void main(Args args)
{
 Class1 class1;
 boolean importRunning = true;
 ;

 class1 = class1::construct();
 
 if(class1.prompt())
 { 
 while (importRunning)
 {
 importRunning = class1.runImport();
 class1.Finalize();
 class1 = class1::construct();
 }
 } 
}

The class1.runImport() runs through an external file and for each 
line in the external file creates a container that is packed and send 
to a static method in Class2, that will import and post the external 
file line:

convertedCon = this.convertToPackedObject(con);
convertedCon = this.pack();
returnImportAndPost = Class2::importAndPost(convertedCon);

Class2: Import and Post one line in the file

static container importAndPost(container invoiceDetailValues)
{
 #define.CurrentVersion(5)

 Class2 class2 = new Class2();
 ;

 class2.unpack(invoiceDetailValues);
 class2 = class2.getPostedDate();

 invoiceDetailValues = connull();
 validAccounntType = invoiceDetail.validateAccountType();

 if (validAccounntType)
 {
 ttsbegin;
 // Import an invoce detail line
 toPostSalesId = class2.Import(invoiceDate);

 // If the import returns a blank sales ID, the import failed
 if (toPostSalesId != )
 posted = class2.Post(toPostSalesId, invoiceDate);
 ttscommit;
 }
 else
 {
 // The invoice detail line does not have a valid account type
 returnvalues = class2.populateReturnContainer(false, 
toPostSalesId, invoiceDate, 0.00, class2.getErrorMessage());
 class2.Finalize();
 return returnvalues;
 }

 returnvalues = class2.populateReturnContainer(posted, 
toPostSalesId, invoiceDate, class2.getTotalCharges(), 
class2.getErrorMessage());
 class2.Finalize();
 return returnvalues;
}

Both Class1 and Class2 contains the following localmacros and pack() 
and unpack():

#define.CurrentVersion(5)

#localmacro.CurrentList1
a1,
a2,
//... 26 elements
a48
#endmacro

#localmacro.CurrentList2
b1,
b2,
//... 18 elements
b48
#endmacro

#localmacro.CurrentList3
c1,
c2,
//... 41 elements
c48
#endmacro

public container pack()
{
 return [#CurrentVersion,
 [#CurrentList1],
 [#CurrentList2],
 [#CurrentList3]];
}

public boolean unpack(container packedClass)
{
 int version = runbase::getVersion(packedClass);
 Container con;
 Container con1;
 Container con2;
 Container con3;

 switch (version)
 {
 case #CurrentVersion:
 [version,con1,con2,con3,con] =packedClass;
 [#CurrentList1] = con1;
 [#CurrentList2] = con2;
 [#CurrentList3] = con3;
 return true;
 default : return false;
 } 

 return false;
}


Each external file contains 1000 lines to be imported and posted.
Batching is implemented in the class1.runImport() method and the 
batches has a size of 100. 
The memory error occurs approximately after 3 files.
The transaction in the Class2::importAndPost method is the only 
transaction used in the process.
The Finalize() methods in Class1 and Class2 are empty.
The SmartHeapMemorySizeUp() has been tested and does not resolve the 
out of memory error.








SPONSORED LINKS 
Computer
http://groups.yahoo.com/gads?t=msk=Computer+partw1=Computer+partw2=Progr
amming+languagesw3=Microsoft+axaptaw4=Support+exchangec=4s=90.sig=yLpvc
LTIDJ5FTkRJGsO11w part  Programming
http://groups.yahoo.com/gads?t=msk=Programming+languagesw1=Computer+part
w2=Programming+languagesw3=Microsoft+axaptaw4=Support+exchangec=4s=90.s
ig=cuhEClK4dU4wapXFmKisbQ languages  Microsoft
http://groups.yahoo.com/gads?t=msk=Microsoft+axaptaw1=Computer+partw2=Pr
ogramming+languagesw3=Microsoft+axaptaw4=Support+exchangec=4s=90.sig=yf
eG_U6QaLfPOZZIud02Fg axapta  
Support