NativeClient and large Geometry
NativeClient and large Geometry
I have problems using NativeClient and Geometry.
After setting:
TMSConnection.Options.Provider:=prNativeClient
I cannot load geometryblobs lager than 8016 bytes using 'Field.AsString' or 'Field.Value' because all bytes higher than 8016 are set to 0.
If I change the provider to prSQL everything works correct. I think, using NativeClient is the better way to connect to SQLServer, so will you fix the bug?
After setting:
TMSConnection.Options.Provider:=prNativeClient
I cannot load geometryblobs lager than 8016 bytes using 'Field.AsString' or 'Field.Value' because all bytes higher than 8016 are set to 0.
If I change the provider to prSQL everything works correct. I think, using NativeClient is the better way to connect to SQLServer, so will you fix the bug?
-
- Devart Team
- Posts: 925
- Joined: Thu 17 Nov 2005 10:53
-
- Devart Team
- Posts: 925
- Joined: Thu 17 Nov 2005 10:53
NativeClient and very large Geometry
I have a new problem using very large geometry (greater than 32767 bytes). You can try following code (Delphi 7, actual version of SDAC)
SetLength(Blob1, 32767);
MyGeomField.AsString:= Blob1;
Blob2:= MyGeomField.AsString;
//
SetLength(Blob1, 32768);
MyGeomField.AsString:= Blob1;
Blob2:= MyGeomField.AsString; // Crash
Is this a new problem or is it also fixed in next build of SDAC?
SetLength(Blob1, 32767);
MyGeomField.AsString:= Blob1;
Blob2:= MyGeomField.AsString;
//
SetLength(Blob1, 32768);
MyGeomField.AsString:= Blob1;
Blob2:= MyGeomField.AsString; // Crash
Is this a new problem or is it also fixed in next build of SDAC?
very large geometry
Sorry, once again my problem with very large geometry.
Your last fix moved the limit from 32767 bytes to 65536 bytes but did not solve the problem (Because of compatibility problems with ODAC I could not test the custom build in production eviroment):
I get no exception using:
GeomField.AsAnsiString:= MyLargeGeomString
but after updating the field I get the .NET Framework error: SystemIO.EndOfStreamException.
SDAC truncates the string to a length of 65536 Bytes. You can reproduce the problem using following code:
//
SetLength(Blob1, 85000);
MyGeomField.AsAnsiString:= Blob1;
Blob2:= MyGeomField.AsAnsiString;
If Blob1 Blob2 then
raise exception.Create('Error');
Your last fix moved the limit from 32767 bytes to 65536 bytes but did not solve the problem (Because of compatibility problems with ODAC I could not test the custom build in production eviroment):
I get no exception using:
GeomField.AsAnsiString:= MyLargeGeomString
but after updating the field I get the .NET Framework error: SystemIO.EndOfStreamException.
SDAC truncates the string to a length of 65536 Bytes. You can reproduce the problem using following code:
//
SetLength(Blob1, 85000);
MyGeomField.AsAnsiString:= Blob1;
Blob2:= MyGeomField.AsAnsiString;
If Blob1 Blob2 then
raise exception.Create('Error');