Hi here is the code to implement stored procedure thru x++
  
  static void storedProcedure(Args _args)
{
   LogInProperty Lp = new LogInProperty();
   OdbcConnection myConnection;
   Statement myStatement;
   ResultSet myResult;
   ;
    LP.setServer("2020");//Set ur server
    LP.setDatabase("MatrixSSI");//set ur database
    Lp.setUsername("sa");//set user
    Lp.setPassword("sa");//set password
    try
    {
        myConnection = new OdbcConnection(LP);
    }
    catch
    {
        info("Check username/password.");
         return;
    }
    myStatement = myConnection.createStatement();
    myResult = myStatement.executeQuery('EXEC [your stored procedure]');
    while (myResult.next())
    {
        print myResult.getString(1);
    }
    pause;
  }
  
  regards,
  sreenath Reddy

Brandon George <[EMAIL PROTECTED]> wrote:
  All,

Here is the blog entry for executing a Stored Procedure through X++:
http://dynamics-ax.blogspot.com/2006/01/execute-dts-package-from-x.html

thanks,
Brandon

-----Original Message-----
From: Axapta-Knowledge-Village@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of chuapatrickd
Sent: Tuesday, May 09, 2006 10:37 PM
To: Axapta-Knowledge-Village@yahoogroups.com
Subject: [Axapta-Knowledge-Village] Re: Stored Procedure

Hi Brandon,

I can't find it, can you just send me the direct link on the stored
procs routine ?


Thanks,
Patrick


--- In Axapta-Knowledge-Village@yahoogroups.com, "Brandon George"
<[EMAIL PROTECTED]> wrote:
>
> Check out my blog: http://dynamics-ax.blogspot.com
>
> I wrote a post on how to do this. If you can't find it let me know
and I can send you the direct link.
>
> Thanks,
> Brandon
>
> -----Original Message-----
> From: Axapta-Knowledge-Village@yahoogroups.com [mailto:Axapta-
[EMAIL PROTECTED] On Behalf Of chuapatrickd
> Sent: Tuesday, May 09, 2006 8:32 PM
> To: Axapta-Knowledge-Village@yahoogroups.com
> Subject: [Axapta-Knowledge-Village] Stored Procedure
>
> Hi to all,
>
> I want to call an sql stored procedure in SQL
database "FILE_SERVER1",
> the name of the stored procedure is "consolidate_invoice", is it
> possible to call this from within x++ code ?
> If it is, can anyone give me sample code ?
>
> It is advisable to do this? or is there any other suggestion.
>
> Thanks,
> Patrick Chua
>
>
>
>
>
>
>
>
>
> Sharing the knowledge on Axapta.
> Visit www.frappr.com/axapta for axapta friends.
> Yahoo! Groups Links
>







Sharing the knowledge on Axapta.
Visit www.frappr.com/axapta for axapta friends.
Yahoo! Groups Links









Sharing the knowledge on Axapta.
Visit www.frappr.com/axapta for axapta friends.



  SPONSORED LINKS
        Business finance course   Business to business finance   Small business finance     Business finance consultant   Business finance magazine   Business finance schools
   
---------------------------------
  YAHOO! GROUPS LINKS

   
    Visit your group "Axapta-Knowledge-Village" 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.

   
---------------------------------
 




Sreenath Reddy G
System Analyst,
Sonata Software Ltd.
1/4, APS Trust Building,
N. R. Colony, Bull Temple Road,
Bangalore-560019.
Mobile-+9886331041

           
---------------------------------
Blab-away for as little as 1ยข/min. Make  PC-to-Phone Calls using Yahoo! Messenger with Voice.

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



Sharing the knowledge on Axapta.
Visit www.frappr.com/axapta for axapta friends.




SPONSORED LINKS
Business finance course Business to business finance Small business finance
Business finance consultant Business finance magazine Business finance schools


YAHOO! GROUPS LINKS




Reply via email to