[development-axapta] HELP: Problems Executing a Stored Procedure AX 4.0
Hello to everybody. Currently I'm trying to execute a SP but AX return an error that says something like this: Can not select a record at ( ) The SQL Data Base has thrown an error. This is the code that i'm trying to execute. I have to say that i allready try to use an ODBC connection without any success. server static InventDimId getLabelInventDimId(JournalId _journalId, Voucher _voucher) { Connection connection; Statementstatement; ResultSet resultSet; SqlStatementExecutePermission perm; str sqlStatement = exec dbo.PFXGetInventDim %1,%2; InventDimId inventDimId; ; connection = new Connection(); sqlStatement = strfmt(sqlStatement,_journalId,_voucher); perm = new SqlStatementExecutePermission(sqlStatement ); perm.assert(); statement = connection.createStatement(); resultSet = statement.executeQuery(sqlStatement); while ( resultSet.next() ) // The Error is thrown here { inventDimId = resultSet.getString(1); } CodeAccessPermission::revertAssert(); return inventDimId; } The Stored Procedure Code on Modification Mode USE [PFX] GO /** Objeto: StoredProcedure [dbo].[PFXGetInventDim]Fecha de la secuencia de comandos: 02/25/2009 12:08:56 **/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO -- = -- Author:Author,,Name -- Create date: Create Date,, -- Description:Description,, -- = ALTER PROCEDURE [dbo].[PFXGetInventDim] @JournalIdvarchar(20), @Vouchervarchar(20), @Resultvarchar(20) Output AS BEGIN -- SET NOCOUNT ON added to prevent extra result sets from -- interfering with SELECT statements. SET NOCOUNT ON; -- Insert statements for procedure here SELECT@Result = dbo.INVENTDIM.INVENTDIMID FROMdbo.PRODJOURNALTABLE WITH (NOLOCK) INNER JOIN dbo.PRODJOURNALPROD WITH (NOLOCK) ONdbo.PRODJOURNALTABLE.JOURNALID = @JOURNALID AND dbo.PRODJOURNALTABLE.JOURNALID = dbo.PRODJOURNALPROD.JOURNALID AND dbo.PRODJOURNALTABLE.JOURNALTYPE = 1 AND dbo.PRODJOURNALPROD.VOUCHER = @Voucher INNER JOINdbo.INVENTTRANS WITH (NOLOCK) ON dbo.INVENTTRANS.VOUCHERPHYSICAL = dbo.PRODJOURNALPROD.VOUCHER INNER JOINdbo.INVENTDIM WITH (NOLOCK) ONdbo.INVENTDIM.INVENTDIMID = dbo.INVENTTRANS.INVENTDIMID END Thank you very much if you can help me :D Gustavo Camargo [Non-text portions of this message have been removed]
[development-axapta] Re:MSDAX5.0 Enterprise Portal
You can find Enterprise Portal samples at http://code.msdn.microsoft.com/axcodesamples http://blogs.msdn.com/solutions/archive/2008/08/04/microsoft-dynamics-ax-2009-enterprise-portal-quick-starts-and-screen-casts.aspx Thanks Mey [Non-text portions of this message have been removed]
RE: [development-axapta] Year end closing/opening
Use the consistency check on the Ledger module Did you import any ledgertrans or ledgerbalance records? Maybe there was some amounts not rounding correctly? Also have you run the currency conversion script on your AX? Not sure if vaguely I remember similiar issue appeared due to that James _ From: development-axapta@yahoogroups.com [mailto:development-axa...@yahoogroups.com] On Behalf Of psmpvr Sent: 24 February 2009 21:22 To: development-axapta@yahoogroups.com Subject: [development-axapta] Year end closing/opening I am trying to perform Fiscal Year End Opening transactions and got the following error: Total of the transactions in the year is not 0.00. Total is 9,924,189.00. This is a serious error. Run \Check\ on ledger transactions. For this what can i do... didi any one had know abt this error [Non-text portions of this message have been removed]
[development-axapta] Re: Year end closing/opening
I run that consistency check for both check fix-error there is no errors.. I didn't import any any ledgertrans or ledgerbalance records the user made some necessary adjustment transactions in legertaccounts. Pls tell me ant remedy is ther? Thanks regards, Subbu --- In development-axapta@yahoogroups.com, James Flavell djf1...@... wrote: Use the consistency check on the Ledger module Did you import any ledgertrans or ledgerbalance records? Maybe there was some amounts not rounding correctly? Also have you run the currency conversion script on your AX? Not sure if vaguely I remember similiar issue appeared due to that James _ From: development-axapta@yahoogroups.com [mailto:development-axa...@yahoogroups.com] On Behalf Of psmpvr Sent: 24 February 2009 21:22 To: development-axapta@yahoogroups.com Subject: [development-axapta] Year end closing/opening I am trying to perform Fiscal Year End Opening transactions and got the following error: Total of the transactions in the year is not 0.00. Total is 9,924,189.00. This is a serious error. Run \Check\ on ledger transactions. For this what can i do... didi any one had know abt this error [Non-text portions of this message have been removed]
Re: [development-axapta] Re: Year end closing/opening
Hi. Off topic, sorry, I'm just interested what kind of consistency check had you run? SQL? Does it exist in AX as well? Thx T ps.: just two idea: - did you run fin. year closing year after year? in 3.0 you have to. - have you checked if there is a real difference? --- On Thu, 2/26/09, psmpvr subbu.man...@gmail.com wrote: From: psmpvr subbu.man...@gmail.com Subject: [development-axapta] Re: Year end closing/opening To: development-axapta@yahoogroups.com Date: Thursday, February 26, 2009, 9:51 AM I run that consistency check for both check fix-error there is no errors.. I didn't import any any ledgertrans or ledgerbalance records the user made some necessary adjustment transactions in legertaccounts. Pls tell me ant remedy is ther? Thanks regards, Subbu --- In development-axapta@yahoogroups.com, James Flavell djf1...@... wrote: Use the consistency check on the Ledger module Did you import any ledgertrans or ledgerbalance records? Maybe there was some amounts not rounding correctly? Also have you run the currency conversion script on your AX? Not sure if vaguely I remember similiar issue appeared due to that James _ From: development-axapta@yahoogroups.com [mailto:development-axa...@yahoogroups.com] On Behalf Of psmpvr Sent: 24 February 2009 21:22 To: development-axapta@yahoogroups.com Subject: [development-axapta] Year end closing/opening I am trying to perform Fiscal Year End Opening transactions and got the following error: Total of the transactions in the year is not 0.00. Total is 9,924,189.00. This is a serious error. Run \Check\ on ledger transactions. For this what can i do... didi any one had know abt this error [Non-text portions of this message have been removed]