I've never seen any real speed improvements, but I agree that SP's have advantages, if they're allowed.



-----Original Message-----
From: Alan Campin [mailto:alan0307d@xxxxxxxxx]
Sent: Friday, January 27, 2017 6:15 PM
To: Midrange Systems Technical Discussion <midrange-l@xxxxxxxxxxxx>
Subject: Re: direct read/write to MS SQL from RPG

No it is easy. Just download Scott Klements JDBC project and a get a Type 4 JDBC driver from Microsoft or an open source one from http://jtds.sourceforge.net/.

The open source one is a lot faster and free as well. Once you have those pieces in place you can read or write to MS-SQL with no problem.

One thing that I always recommend is don't read and write directly to the database. Either write or have someone write Stored Procedures in the MS-SQL language. Always call those stored procedures to do your I/O. The biggest advantage is that you can test them separately. and almost always you will find that you might need to do multiple I/O operations to get one result. Doing that in a stored procedures is going to be a lot faster.
Instead of reading back some data and then using that to read other data you can do whatever you need in the stored procedures.

In addition, if you are doing updates, it gives you the ability to test incoming data and make sure that it is valid.

Anyway, if you want some example code of calling stored procedures please let me know.



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.