× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



As Alan has said it can indeed be done. JCBC is not the only option though if your boss is willing to spend a few $s.

Our colleague Vern Hamburg worked on a project now owned by Help Systems which provides the ability to either code at an API level, or by using an Open Access handler to allow a SQL Server table to be read/written by regular RPG opcodes. That would make your task pretty easy I would think. I've looked at Help's web site but I'm darned if I can work out what the product is now called so hopefully Vern will chime in.


Jon Paris

www.partner400.com
www.SystemiDeveloper.com

On Jan 27, 2017, at 7:14 PM, Alan Campin <alan0307d@xxxxxxxxx> wrote:

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.

On Fri, Jan 27, 2017 at 3:19 PM, Elden Fenison <
Elden.Fenison@xxxxxxxxxxxxxxxxx> wrote:

I work in a bit of a mixed environment. I could probably swing figuring
out how to sync an MS SQL database with files on the IBM i. I've done that
in the past with SSIS. But my boss has come up with a plan where he wants
me to be able to read/write directly to the MS SQL database (presumably
from RPG).

I personally don't think it can be done. Can anyone shed light?

[cid:image001.jpg@01D278B0.BA212FC0]
Elden Fenison
Programmer/Analyst
Murphy Company
elden.fenison@xxxxxxxxxxxxxxxxx<mailto:elden.fenison@xxxxxxxxxxxxxxxxx>
541-461-1304

--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/midrange-l.

Please contact support@xxxxxxxxxxxx for any subscription related
questions.

Help support midrange.com by shopping at amazon.com with our affiliate
link: http://amzn.to/2dEadiD

--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/midrange-l.

Please contact support@xxxxxxxxxxxx for any subscription related questions.

Help support midrange.com by shopping at amazon.com with our affiliate link: http://amzn.to/2dEadiD


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.