1. Joe Hess
  2. PowerBuilder
  3. Tuesday, 9 October 2018 17:20 PM UTC

SQL Server 2014. I have a column in a table of type VARCHAR(max). The column is used as a free-form comments field for an invoice. When I try to access the column on the invoice freeform datawindow, I receive the following error:

 

Microsoft SQL Server Native Client 11.0. Multiple-step OLE DB operation generated errors.

Do I need to change the column type in the database? Cast it to a different type in the SQL statement? Is there something I'm missing in the connection string?

 

Thank you,

Joe Hess

 

Accepted Answer
Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Thursday, 11 October 2018 16:16 PM UTC
  2. PowerBuilder
  3. # Permalink

Hi Joe ;

  There could be many reasons for this failure. Can you tell /show us ...

  1. Related PB / SQL code
  2. DB Return Codes (SQLCA)
  3. DB Error Text (SQLCA)

Also, did you try running an SQL trace?

SQLCA.DBMS = "TRACE SNC"

Regards ... Chris

Comment
  1. Joe Hess
  2. Tuesday, 16 October 2018 13:13 PM UTC
Chris,



Thanks for the heads up on the trace. Turned out the problem was a varchar(max) field in a nested report. The report definition had the column type at CHAR(4099). I reselected the column. PB changed it to CHAR(32766). Is that the max it can go? Is there a better way to put a large text column on a datawindow?



Joe
  1. Helpful
  1. Chris Pollach @Appeon
  2. Tuesday, 16 October 2018 15:31 PM UTC
Hi Joe ;

Yes, the DWO column size handling is 32K. A limitation from way back in the PowerSoft days before Sybase even took over PB. Anything greater than that size you have two alternatives: 1) use the DWO's TableBlob feature or 2) handle the large data stream yourself via a SelectBlob command.

Regards ... Chris
  1. Helpful
There are no comments made yet.
David Peace (Powersoft) Accepted Answer Pending Moderation
  1. Thursday, 11 October 2018 16:00 PM UTC
  2. PowerBuilder
  3. # 1

Hi Joe

I do not have a solution for you, but the lack of response would make me think that people have not seen this before. Certainly we have used varchar(max) extensively and that has been fine.

So in order to help can you please give your connection parameters and lets see if there is something in them that might be causing your problem?

David

Comment
There are no comments made yet.
Joe Hess Accepted Answer Pending Moderation
  1. Friday, 12 October 2018 13:04 PM UTC
  2. PowerBuilder
  3. # 2

The app I'm working on is being migrated from PB9. I've tried a few other parameters such as DBTextLimit and OptSelectBlob.

 

DBMS=SNC SQL Native Client(OLE DB)
ServerName=10.1.1.9
Database=Test
DBParm=Database='Test',Provider='SQLNCLI11',PacketSize=16384

 

Attached is the datawindow source.

 

Thanks

Joe

Attachments (1)
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.