JDBC_ExecUpd limited to 32767A

Scott Klement's open source interface to using JDBC database drivers from RPG. http://www.scottklement.com/jdbc/
Post Reply
troberts76
Posts: 2
Joined: Fri Oct 04, 2024 11:51 am

JDBC_ExecUpd limited to 32767A

Post by troberts76 »

Hi Scott

Is there anyway to use these procedures but pass more than this 32767 character limit.

I have a large amount of data that I need to write to a varchar(max) field.

Thanks
Tony
Scott Klement
Site Admin
Posts: 799
Joined: Sun Jul 04, 2021 5:12 am

Re: JDBC_ExecUpd limited to 32767A

Post by Scott Klement »

Typically you'd use the JDBC_setString() to set the value of a VARCHAR field. (JDBC_ExecUpd is used for passing the SQL statement, but to set the variable values in the statement, you'd use JDBC_setString)

Currently, the JDBC_setString() uses a 32k parameter. But, you have the source code, so you could make that larger -- or, better, you could clone the routine to create a JDBC_setString1m routine that allows for 1 megabyte, for example. Then you can contribute the new code back to the project to help anyone else that has a need for the larger field size.

It's not a big project to make a change like this. I'm also available on a consulting basis, if you wanted to buy a few hours of my time to do it for you, I would be open to that.
troberts76
Posts: 2
Joined: Fri Oct 04, 2024 11:51 am

Re: JDBC_ExecUpd limited to 32767A

Post by troberts76 »

Thanks so much for the prompt reply Scott.

OK, so I was on the right path thinking that we'd need a new procedure, was hoping that something existed.
But I see they all just call java classes in the back, so not a biggie.

I'm definitely keen on trying this out and contributing to the community , would be a first.

I'm in South Africa, the exchange rate to the Dollar sucks, so I'll have to start saving to buy some of your hours, but will be money well spent.

Regards
Tony
Post Reply