1. Apoorva JUKANTI
  2. PowerBuilder
  3. Tuesday, 21 May 2024 05:09 AM UTC

Hi,

We are migrating our application from SQL native client to ODBC 18 for SQL server driver, but facing an issue while using SELECTBLOB as the PBMAXBlobSize is default set to 32767.

 Already tried updating the pbodb.ini, its working, but need it to be done through code.

Tried the sqlca.dbparm = "CONNECTSTRING='DSN=MSS2022;UID=MSS2022;PWD=MSS202212',PBCATALOGOWNER='MSS2022',DATASOURCE='DEVTEST',PBMaxBlobSize=1966020,DISABLEBIND=1"

But of no use, SELECTBLOB is not working as expected.

How can we increase the blob size while connecting to odbc driver using dbparm??

 

And if we have to use pbodb.ini, can the modified PBODB.ini be deployed with PBRuntime MSI?

 

Please suggest

Roland Smith Accepted Answer Pending Moderation
  1. Tuesday, 21 May 2024 19:55 PM UTC
  2. PowerBuilder
  3. # 1

If you look at the help topic for PBMaxBlobSize, you would see it isn't supported for ODBC.

You need to use MSOLEDBSQL instead.

Comment
  1. Chris Pollach @Appeon
  2. Tuesday, 21 May 2024 21:16 PM UTC
Hi Roland;

Correct - it's restricted use in the DBParm field setting of SQLCA.

However, this is supported in the ODBC layer via the PBODB.ini file setting

=> (which then needs to be deployed with the App EXE).

I agree though that MSOLEDBSQL is the long term way forward (MS current direction).

Regards .. Chris

  1. Helpful
There are no comments made yet.
John Fauss Accepted Answer Pending Moderation
  1. Tuesday, 21 May 2024 13:36 PM UTC
  2. PowerBuilder
  3. # 2

Hi, Apoorva -

I do not know if what I'm about to suggest will work... you will need to see if it does the trick.

Before your app configures the properties of its Transaction object (SQLCA, for example), Use the PowerScript functions for getting/setting values from an INI file: ProfileString and SetProfileString (There is also a ProfileInt function for reading integer values from an INI file, but the value you are wanting to get/set exceeds the capacity of an integer).

The idea would be to read the value from the pbodb.ini, change it if needed, then proceed to initialize and connect to the database via ODBC in the normal manner. Obviously, the app will need to have write access to the pbodb.ini file for this to work.

Best regards, John

Comment
  1. David Peace
  2. Wednesday, 22 May 2024 10:57 AM UTC
I was going to suggest that same, but using the MSOLEDB as Roland suggested is the best way forward.
  1. Helpful
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.