Hi all;

 

We have a program (C#) that uses Axapta2 interface and inserts a record in table “UrunRecetesiOnay”.

When we logon to axapta and log off for every button click we get error (Picture below).

If we logon on formload and log off on formunload there is no error, but it uses one of my license users permanently.

 

Why can this happen, what can i do?

 

Thanks.

 

 

 

            private void Form1_Load(object sender, System.EventArgs e)

            {

               axapta = new Axapta2();

               axapta.Logon2("datasistem","aaaabbbb","spk","","SPARK","","",0,0,0);

            }

 

            private void button1_Click(object sender, System.EventArgs e)

            {   

                  string Axapta_Parameter;

                  axapta = new Axapta2();

                  axapta.Logon2("datasistem","riva","spk","","SPARK","","",0,0,0);

                  Axapta_Parameter=textBox1.Text;

                  Axapta_Gonder(Axapta_Parameter);              

            }    

            public void Axapta_Gonder(string Axapta_Recete)

            {  

                  IAxaptaRecord MyRecord;

                  MyRecord = axapta.CreateRecord("UrunRecetesiOnay");

                  axapta.TTSBegin();

                  MyRecord.set_field("ReceteId",Axapta_Recete);

                  MyRecord.Insert();

                  axapta.TTSCommit();

                  MessageBox.Show(this,"Axapta'ya Veri Aktarıldı.","Axapta'ya Veri Aktarma");

                  axapta.Logoff();

            }

            private void button2_Click(object sender, System.EventArgs e)

            {

                  axapta.Logoff();

            }

 

 

 

 



Sharing the knowledge on Axapta.



Yahoo! Groups Links

<<image001.jpg>>

Reply via email to