1. Peter Klopfer
  2. SnapDevelop
  3. Saturday, 11 December 2021 14:10 PM UTC


I'm beeing writing a small WEB-API which has to process POSTed metadata and files as json-data and insert it into a SQL Server database.

I know, the client could send the data and files together in one POST using the content-type form-data. 

But it could work more easily if the file contents were delivired BASE64 encoded in JSON text fields. I gave it a try and it worked, but for a maximum filesize of 32K only, as is usual with ODBC.

Earlier I had the same restriction with PowerBuilder and could solve it manipulating der PBOdbc.ini file setting PBMaxTextSize.

Is there any setting with SnapDevelop data sources which has the same effect?

Any hint would be very much appreciated




Accepted Answer
David Xiong @Appeon Accepted Answer Pending Moderation
  1. Monday, 13 December 2021 16:43 PM UTC
  2. SnapDevelop
  3. # Permalink

Hi Peter,

The reason for this limitation is the [StringLength(32767)] attribute of the aDatei1 column in the Model D_Antrag. This is because the StringLength attribute is generated when converting Datawindows to C# Models in SnapDevelop. The value of StringLength comes from the Edit.limit property value of aDatei1 column. You can try to use one of the following options to work around this problem.

Option 1. Set the Edit.limit value of the aDatei1 column from D_Antrag.srd to 0 in the PowerBuilder IDE to remove the limit of this column.

Option 2. Do not generate the StringLength attribute when converting Datawindows to C# Models. You can set it from Menu > Tools > Options on SnapDevelop IDE (as shown below)



  1. Peter Klopfer
  2. Monday, 13 December 2021 17:06 PM UTC

you made my day - it works either way.

And the solution was so easy... (Yes, I have to admit being an absolute noob)

Thanks for your help

  1. Helpful
There are no comments made yet.
Peter Klopfer Accepted Answer Pending Moderation
  1. Saturday, 11 December 2021 16:28 PM UTC
  2. SnapDevelop
  3. # 1


thanks a lot for your super quick response.

Yes, I am using .NET DataStore and the NuGet package is installed in my project. So it's not ODBC, actually.

Look at the attachment - there you see the datastore representation and the create-method.

As I told you - it works fine, but only with max. 32K text values.

Should I use the SnapObject framework instead?



Attachments (1)
  1. Armeen Mazda @Appeon
  2. Saturday, 11 December 2021 16:38 PM UTC
Are you using the SnapObjects SQLServer driver? The .NET DataStore requires it because it is built on top of SnapObjects framework.
  1. Helpful
  1. Peter Klopfer
  2. Saturday, 11 December 2021 17:06 PM UTC
Yes, my data context uses SnapObjects.Data.SqlServer and the connection string looks like

"ConnectionStrings": {

"FISCHE": "Data Source=KS30\\I2019;Initial Catalog=FISCHE;Integrated Security=False;User ID=sa;Password=coupon;Pooling=True;Min Pool Size=0;Max Pool Size=100;MultipleActiveResultSets=False;Encrypt=False;TrustServerCertificate=False;ApplicationIntent=ReadWrite"


But why the 32K restriction?

  1. Helpful
  1. Armeen Mazda @Appeon
  2. Saturday, 11 December 2021 17:39 PM UTC
Please wait until Monday for analysis from one of our product engineers if this is limitation of SnapObjects framework or limitation of SQL Server driver or something else.
  1. Helpful
There are no comments made yet.
Armeen Mazda @Appeon Accepted Answer Pending Moderation
  1. Saturday, 11 December 2021 15:54 PM UTC
  2. SnapDevelop
  3. # 2

Are you using the .NET DataStore or SnapObject framework?  If yes, then connection to SQL Server is native not ODBC. You would use this NuGet package:  https://www.nuget.org/packages/SnapObjects.Data.SqlServer/


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.