1. Larry Peters
  2. PowerBuilder
  3. Thursday, 26 April 2018 23:24 PM UTC

In an app I am working on I need to update a column in a Microsoft SQL Server database table with a PDF file.

I am using the Microsoft SQL Server ODBC connection.

The table (ISPDF02) has a column called ISPDF which is of data type IMAGE and a CHAR column ISNAME which is a primary key.

This app is running in PB11.5. The pbodb115.ini file has PBMAXBLOBSIZE=2147483647 and PBMAXTEXTSIZE=2147483647,

The PDF file is read into a blob variable lb_blob.

On executing: updateblob ispdf02 set ispdf02.ispdf = :lb_blob where ispdf02.isname = :ls_name using mytr;

This works fine EXCEPT I get this error whenever the size of lb_blob is greater than approx 409,000 bytes:

Error updating ISPDF02.ISPDF SQLSTATE = S1010 [Microsoft][ODBC Driver Manager] Function sequence error

Any ideas? Suggestions? I read that IMAGE is deprecated. I get the same result with VARBINARY(max).

TIA

Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Friday, 27 April 2018 03:30 AM UTC
  2. PowerBuilder
  3. # 1

Hi Larry;

   Does it work if you add this into the DBParm field of your Transaction Object vs relying on the PBODB115.ini file setting?

For example ....

  • SQLCA.DBParm = "ConnectString='DSN=SS;UID=Chris;PWD=<******>;PBMaxBlobSize=1000000',Async=1,DBGetTime=5,ConnectOption='SQL_DRIVER_CONNECT,SQL_DRIVER_NOPROMPT',PacketSize=2048"

 

Regards ... Chris

Comment
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.
We use cookies which are necessary for the proper functioning of our websites. We also use cookies to analyze our traffic, improve your experience and provide social media features. If you continue to use this site, you consent to our use of cookies.