1

I' have to write an import procedure in c# for a customer. The procedure needs to read data from an AS400 iSeries, so my first Question is: what's "better" (pro/cons) between direct connection (using ADO.NET) and an ODBC connection?

Second question: if I used ADO.NET would it be possible to simulate the server?

HopelessN00b
  • 53,795
  • 33
  • 135
  • 209
Darko Romanov
  • 135
  • 1
  • 2
  • 10

2 Answers2

3

I am not sure what you mean by "simulate", but I use the ADO.NET driver provided with the IBM i Access software. Here are some samples of how I use the driver.

Mike Wills
  • 834
  • 6
  • 19
  • Sorry, I meant that I don't have a IBM here in development environment, so I wonder if there is some sort of "AS400 emulator", something that let me develop and test my procedure. – Darko Romanov Dec 16 '13 at 16:01
  • Unfortunately, there is not an emulator. I don't know of a great way to write queries when you don't have direct access to the system. At some point in the development cycle, you would need direct access to test your code. There is enough differences that could cause problem that it isn't easy. – Mike Wills Dec 16 '13 at 19:30
  • Thanks Mike, I was afraid I already knew the answer. From this point of view it's better if I use ODBC so I can test the code locally, I wire my odbc to a MSSQL db, my only doubt if there are performance issues using ODBC instead of ADO.NET. I need to query and retrieve few thousands of records. – Darko Romanov Dec 18 '13 at 10:35
  • I don't know, I think in the end you'll about the same performance. – Mike Wills Dec 20 '13 at 20:16
  • The only problem with testing a query meant for DB2 for i against MSSQL is that MSSQL has so many deviations from standard ANSI SQL, and those things have different syntax on DB2 for i (e.g. CROSS JOIN). DB2 for i also has some deviations from ANSI Standard SQL, but IBM is working to provide ANSI standard aliases for those differences. – jmarkmurphy Jan 26 '23 at 16:43
0

Never tried ODBC but I have worked both with OleDbConnection & Client Access System.Data.DB2.ISeries using ISeries and ASP.NET & performance was worthwhile. Only problem was that we could not get distributed transactions to work with OleDBConnection.

I do not understand what do you mean by simulating server? Also you can use OleDB, ODBC, DB2.ISeries with ADO.NET to access data on the ISeries.

Zo Has
  • 101
  • 2