ODBC connection to AS400

Wish to see a specific feature/change in future releases? Feel free to post it here, and if it gets enough "likes", we'd definitely include it in future releases!
Post Reply
federico
Veteran Member
Posts: 74
Joined: 2020-10-29 14:52

ODBC connection to AS400

Post by federico » 2021-01-27 10:10

Hi
We have as AS400 ERP which means we can get data through ODBC connection.
I have many file on excel connected through ODBC, but now that I create many applications by Appgini I'd realy like to get data on my web applications made by Appgini. So my question is: does anybody have experience on it?
I suppose that:
- I should create a table in Appgini with the same field (same properties?) of the table in AS400, right?
- After updated the application in the Windows Server, how I make the connection to read data? Which parameter should I change? IP address, name, password...
- Could I keep it in the same project/application where I have other standard table (not connected to the AS400) or should I make a new one?

thanks in advance for your time and help
Federico

User avatar
jsetzer
AppGini Super Hero
AppGini Super Hero
Posts: 1807
Joined: 2018-07-06 06:03
Location: Kiel, Germany
Contact:

Re: ODBC connection to AS400

Post by jsetzer » 2021-01-27 10:21

Honestly speaking, from my experience I would suggest using a specialized ETL tool on your server for connecting to your AS400. Use such a data-centric tool for modeling your dataflow. Those tools can usually connect to various datasources.

The workflow should fetch data from AS400 and insert (synchronize) into MySQL Tables. As soon as the data has been inserted into MySQL, you can use your AppGini tables and forms as always.

From my experience, KNIME* (https://www.knime.com/) may be a suitable option.

* Disclaimer: As far as I know KNIME is not free. I am not related to that vendor in any way.
Kind regards,
<js />

My AppGini Blog:
https://appgini.bizzworxx.de/blog

You can help us helping you:
Please always put code fragments inside [code]...[/code] blocks for better readability

AppGini 24.10 Revision 1579 + all AppGini Helper tools

federico
Veteran Member
Posts: 74
Joined: 2020-10-29 14:52

Re: ODBC connection to AS400

Post by federico » 2021-01-27 12:18

mmmmm
Can I use the ODBC connector for MySql? I found also that it works with xampp too

https://dev.mysql.com/downloads/connector/odbc/

User avatar
onoehring
AppGini Super Hero
AppGini Super Hero
Posts: 1156
Joined: 2019-05-21 22:42
Location: Germany
Contact:

Re: ODBC connection to AS400

Post by onoehring » 2021-01-28 09:10

Hi,

I used MySQL ODBC to connect from an MS Access database (frontend Access, SQL server backend) to an AppGini application. In my case I am throwing data from MS Access into the web (AG) application: Usernames, passwords, and pulling data from the webapplication into the Access.
Works like a charm - but you need to make sure, you have an MySQL ODBC driver that works. Sounds strange - I know, but I (actually customer) had problems. We found out that it seemed to be the MySQL ODBC driver version that made the difference. For me the version 8.00.15.0 works. My customer first had a newer version that did not work so we downgraded to that version and everything worked (and still does).
Please be aware, that you need the correct ??bit version - maybe try both ;-)
odbc.png
odbc.png (53.14 KiB) Viewed 3341 times
Olaf

federico
Veteran Member
Posts: 74
Joined: 2020-10-29 14:52

Re: ODBC connection to AS400

Post by federico » 2021-01-29 08:05

Thank you Olaf for your advice. This is an interesting thing to know:-)

federico
Veteran Member
Posts: 74
Joined: 2020-10-29 14:52

Re: ODBC connection to AS400

Post by federico » 2021-02-03 10:03

Hi all again
Ok, I have Xampp, ODBC driver installed... I tried but I think to be more noob than what I believe and I'm not able to find a tutorial or a good explanation on how to proceed.
Can anybody explain step by step how to make in relation Appgini, Xampp and ODBC?

thanks a lot!

User avatar
onoehring
AppGini Super Hero
AppGini Super Hero
Posts: 1156
Joined: 2019-05-21 22:42
Location: Germany
Contact:

Re: ODBC connection to AS400

Post by onoehring » 2021-02-04 07:50

Hi,

you probably need to set up a new database (connection) in AppGini.
Take a look at the file /db.php

... just a very quick suggestion.
Olaf

federico
Veteran Member
Posts: 74
Joined: 2020-10-29 14:52

Re: ODBC connection to AS400

Post by federico » 2021-02-05 10:19

Hi Olaf
I checked the db.php. Should I change data only on function db_connect?
How do I keep also the connection on internal database on the same project? Or should I keep 2 different projects? :?

I mean there's no any guide for this guys. I ununderstand that Appgini is more focused on internal database, but having the possibility to connect to other database could be a plus. And some quick video guy could be a great help. Just my point of view.

However thanks for your time. I'll search for a workaround as import data every month from csv. Just a long workaround that doesn't help me to develope more apps thorugh appgini :cry:

User avatar
onoehring
AppGini Super Hero
AppGini Super Hero
Posts: 1156
Joined: 2019-05-21 22:42
Location: Germany
Contact:

Re: ODBC connection to AS400

Post by onoehring » 2021-02-06 08:33

Hi,

why don't you go the other way? Use some script to push data from AS400 to MySQL? This could be done almost on a regular basis using windows taskplaner or such.

On the other part:
You may copy the AG db functions and rename them. Then use regular functions to access MySQL and "your" functions to access AS400

Olaf

federico
Veteran Member
Posts: 74
Joined: 2020-10-29 14:52

Re: ODBC connection to AS400

Post by federico » 2021-02-06 10:27

I’d like to replace the excel file which I use to take data from AS400, with appgini applications. I already have data connections and sql. I just need to understand where to collocate them in db with odbc connector

User avatar
onoehring
AppGini Super Hero
AppGini Super Hero
Posts: 1156
Joined: 2019-05-21 22:42
Location: Germany
Contact:

Re: ODBC connection to AS400

Post by onoehring » 2021-02-08 09:32

Hi,

maybe write yourself some bridge code that pulls all data from AS400 into MySQl - maybe in the init function of a table. By bridge code I mean: use non-AG functions but open a regular ODBC channel.

Olaf

Post Reply