Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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?

share|improve this question

2 Answers 2

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.

share|improve this answer
    
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

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.

share|improve this answer
    
I finally used ODBC and it works fine, I was only concerned about performance but it seems quite fast. –  Darko Romanov Feb 14 at 13:26

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.