How to integrate Microsoft Access Database with AX 2012

Question Status

Suggested Answer
dapdomma asked a question on 31 Jul 2016 5:47 PM

Dear Members,

Please I have a Weighbridge that has a Microsoft Access database that I will like to integrate with AX 2012.

I need the inform from the Access database for use by AX 2012.

Please how can I achieve this.

Best Regards

Reply
Suggested Answer
ievgen Miroshnikov responded on 31 Jul 2016 5:51 PM

Hi dapdomma,

Please refer to thread with similar question community.dynamics.com/.../165264

Reply
dapdomma responded on 31 Jul 2016 11:54 PM

Thanks can I get a better guide.

Best Regards

Reply
ievgen Miroshnikov responded on 1 Aug 2016 1:39 AM

You did not understand something from that thread or what is your question ?

Reply
dapdomma responded on 1 Aug 2016 2:46 AM

Hi,

I want the AX 2012 to retrieve data from  Access Database. I want the integration to be in such a way that the Truck Weight IN and Out that has been captured in the Weighbridge software(Access) will be automatically be filled in when the user just select the Track Number in AX 2012.

Thanks

Reply
ievgen Miroshnikov responded on 1 Aug 2016 2:57 AM

Thanks for the explanation.

What kind of help do you require ?

You don't know how to connect to Access or how to retrieve data or you don't understand how to build whole solution ?

Reply
dapdomma responded on 1 Aug 2016 3:54 AM

I know that I can use ODBC for connection but I need to know why to build a whole Solution.

I just need a manual on how to do this

Best Regards

Reply
ievgen Miroshnikov responded on 1 Aug 2016 4:20 AM

1) Create a class that will connect to Access DB and select truck weight by track id jkmsdax2012.wordpress.com/.../external-database-or-odbc-connection-in-ax-2012 as example.

2)  Add code that will call class from 1.  when user modifies track id to get required values and populate them to required fields.

It's hard to provide any details because I have no idea how  Weighbridge software looks like, what tables it has and what data you need to select  or what form you are referring to when you are talking about truck id.

Reply
dapdomma responded on 8 Aug 2016 10:06 AM

Dear Members,

Please see one of the .mdb  files one want to integrate with AX2012,  kindly assist with the steps to integrate it with AX 2012,

1 1 2 GWA104XA 70 50 8:03:58 AM 8:06:59 AM 08-Aug-16 08-Aug-16 1 2 a SO123456 A 2 E 1 20 0 50 0 0 0 5 4 3 5.55 4.55 3.55 100 0 150 0 0 0 250
2 3 KEF 991 XA 3740 9:00:04 AM 08-Aug-16 a   A E 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
3 4 16 KRV 627 ZN 4620 12180 9:00:57 AM 11:49:37 AM 08-Aug-16 08-Aug-16 a   A E 1500 0 0 0 0 0 5.1 4.3 3.1 0 8.6 6.2 7650 0 0 0 0 0 7650
4 5 AKW 816 XA 7470 9:57:19 AM 08-Aug-16 a   A E 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
5 6 ABJ 78 XD 3470 9:58:26 AM 08-Aug-16 a   A E 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
6 7 ABJ 979 XD 6100 10:00:49 AM 08-Aug-16 a   A E 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
7 8 XM 266 LSD 5450 10:01:44 AM 08-Aug-16 a   A E 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
8 9 GGE 293 XR 8780 10:30:39 AM 08-Aug-16 a   A E 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
9 10 NTT 481 XA 8300 10:32:38 AM 08-Aug-16 a   A E 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
10 11 KEF 286 XD 6020 10:35:08 AM 08-Aug-16 a   A E 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
11 12 BDG 956 XD 5610 10:35:57 AM 08-Aug-16 a   A E 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
12 13 NSW 65 XA 5250 10:38:50 AM 08-Aug-16 a   A E 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
13 14 KUJ 468 XT 5150 10:39:42 AM 08-Aug-16 a   A E 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
14 15 ABC 983 XA 7200 10:45:15 AM 08-Aug-16 a   A E 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Reply
Suggested Answer
Shobhit Jaiswal responded on 30 Dec 2016 10:56 PM

I have the same requirement. I have collected some information from web related to creating new DSN 32bit, at configuring it will act as a Client for the Weighbridge Software. Next we should communication port details of Weighbridge Software like Example below:

  1. COM 1, Baud Rate – 9600, Databit – 7, Stop Bit – 1
  2. COM 3, Baud Rate – 9600, Databit – 7, Stop Bit -  1  

There our required fields are mainly Weights i.e. Gross, Tare and Net(calculated)

At AX, We shall program like such :

https://msdn.microsoft.com/en-us/library/ee677510(v=ax.50).aspx

Pretty sure, we can achieve this !

Shobhit

Reply
Martin Dráb responded on 31 Dec 2016 12:55 AM

Shobhit, using COM ports is a very different approach than using ODBC. But if you go that way, you can use SerialPort class.

Reply
Shobhit Jaiswal responded on 2 Jan 2017 5:43 AM

Absolutely Martin I agree.

Reply
Suggested Answer
ievgen Miroshnikov responded on 31 Jul 2016 5:51 PM

Hi dapdomma,

Please refer to thread with similar question community.dynamics.com/.../165264

Reply
Suggested Answer
Shobhit Jaiswal responded on 30 Dec 2016 10:56 PM

I have the same requirement. I have collected some information from web related to creating new DSN 32bit, at configuring it will act as a Client for the Weighbridge Software. Next we should communication port details of Weighbridge Software like Example below:

  1. COM 1, Baud Rate – 9600, Databit – 7, Stop Bit – 1
  2. COM 3, Baud Rate – 9600, Databit – 7, Stop Bit -  1  

There our required fields are mainly Weights i.e. Gross, Tare and Net(calculated)

At AX, We shall program like such :

https://msdn.microsoft.com/en-us/library/ee677510(v=ax.50).aspx

Pretty sure, we can achieve this !

Shobhit

Reply