rduncan10
4th October 2013, 17:15
I'm writing a web application in Visual Studio/C# that will pull data from our Baan server.

I'm trying to figure out what would be the best way to do this.

The application will be used for receiving. The web site will be access from mobile devices, like an iPhone or tablet. The user will enter an item or purchase order and get from Baan any open order lines.

We are running Baan 4 with Oracle on a Linux server. We don't have and can't afford OpenWorld, ION, etc. So I think these are my options:

I am only looking at options for getting read-only data from Baan. I know that for sending data back to Baan, I have to use AFS to update the data.

Option 1:
Query the Oracle database in Visual Studio. This seems like a good solution, but as I look around at other integration solutions, very few seem to directly access the database. I know one reason for this is that Baan can work with other databases. Since I'm writing this for our specific environment, that is not really an issue. And if you do it right, Visual Studio can be fairly database-independent too. Are there other good reason to avoid direct database queries?

Option 2:
Create a Baan session that exports the open POs periodically as a flat file or XML. Have the VS application import this. This seems like an okay option, but there could be some timing issues.

Hybrid Option 1/2:
I could combine option 1 and 2. Instead of letting each user send a request to the Oracle database, I could have VS do a periodic import of open orders from Oracle into the SQL database behind the website. This could minimize the number of connections to Oracle.

Option 3:
Use the Baan OLE to access Baan through function servers. In doing some checking, this doesn't seem like it is supported and is too buggy for a production environment.

Other options?
Thanks

bhushanchanda
4th October 2013, 18:24
Well, option 1 seems fine if you have a proper network infrastructure. But, as you are looking forward to include tablets and mobile devices too, it could be time consuming as it might take time to first create the connection with database and then retrieving the data from a huge chunk of PO table and other fields from different tables as well (if its in your requirement).

I would think of creating a single table which will be updated with the information you require when some PO is created. If the PO is processed, the entry from the table will be removed. Now, at this point you can go with 2 options, either you can directly connect the database and pull the data from this table else as you mentioned, you can create flat/xml/html file with the name as PO Number when an entry is added to this table and simultaneously remove the files when PO is processed.
In this way, when user puts a request for a PO, you can check if any file exists with that PO number in your directory. If yes, just transfer the file on your device.

mark_h
4th October 2013, 23:37
We use option 1 with some other programs. I am not sure what they are written in - but they write directly to a baan table. The users then use a baan session to process the records. Of course this is not via wireless or remote devices - I believe it is a couple of different java web apps that does this.

All of our receiving and stores are pretty much setup with AFS code. Again no wireless devices or anything yet. Works good, in my opinion, to process through receipts and stores. Our uses have to do so much less entering and tabing, starting sessions, etc. to get the part received, stored and issued.

The worst option in my opinion is using ole or option three. It also can access baan tables, but is slow even from my desktop. It was very sensitive to upgrades and I was told once it was not supported.