Sorry, once again my problems with very large geometries.
In the latest versions of SDAC TMSQuery works fine with large geometries, but not TMSSQL.
Whith large geometries (more than 16 KB)
TMSQuery.FieldByName('GEOMETRY).AsBytes:= LargeGeometry
works but
TMSSQL.ParamByName('GEOMETRY').AsBytes:= LargeGeometry
raises an error.
Is this the same bug, which was previous in component TMSQuery?
Stefan
TMSSQL and large geometry as param
-
AndreyZ
Sorry, my describtion was too short.
this code works:
MSQuery.Edit;
MSQuery.FieldByName('GEOMETRY).AsBytes:= LargeGeometry;
MSQuery.Post;
same using TMSSQL does not work:
MSSQL.ParamByName('GEOMETRY').DataType:= ftVarBytes;
MSSQL.Prepare;
MSSQL.ParamByName('GEOMETRY').AsBytes:= LargeGeometry;
MSSQL.Execute;
I get the SQLServer exception "unexpected end of file".
SDAC cuts of data which length is more then xxx bytes. For me it is the same bug, which was in SDAC (MSQuery) described in blog "Native Client and large Geometry"
this code works:
MSQuery.Edit;
MSQuery.FieldByName('GEOMETRY).AsBytes:= LargeGeometry;
MSQuery.Post;
same using TMSSQL does not work:
MSSQL.ParamByName('GEOMETRY').DataType:= ftVarBytes;
MSSQL.Prepare;
MSSQL.ParamByName('GEOMETRY').AsBytes:= LargeGeometry;
MSSQL.Execute;
I get the SQLServer exception "unexpected end of file".
SDAC cuts of data which length is more then xxx bytes. For me it is the same bug, which was in SDAC (MSQuery) described in blog "Native Client and large Geometry"
-
AndreyZ
Thank you for the information. We have fixed this problem. This fix will be included in the next SDAC build. As a workaround, you can use the following code:
Code: Select all
MSSQL.DescribeParams := True;
MSSQL.Prepare;
MSSQL.ParamByName('GEOMETRY').AsBytes := LargeGeometry;
MSSQL.Execute;