error importing shape file

Topics: Developer Forum, User Forum
Feb 17, 2009 at 2:57 PM
Hi
When I run the following command:
msscmd.exe -server=(local) -db=TestSpatial -table=SYLSOA -column=geom_column -import=shp -shp_filename=shapes/SYLSOA.shp
I get the following error. The table imports OK but the "geom_column_Envelope_MinX" field and other Min/Max fields are all NULL.
New to GIS so don't know if these fields are required, so any help or advice would be much appreciated.

Many Thanks

Unhandled Exception: System.Data.SqlClient.SqlException: A .NET Framework error occurred during execution of user define
d routine or aggregate 'MinX':
System.OverflowException: Arithmetic Overflow.
System.OverflowException:
   at System.Data.SqlTypes.SqlDouble..ctor(Double value)
   at UserDefinedFunctions.MinX(SqlBytes ewkb)
.
The statement has been terminated.
   at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection)
   at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)
   at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)
   at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, Bulk
CopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)
   at System.Data.SqlClient.SqlCommand.RunExecuteNonQueryTds(String methodName, Boolean async)
   at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(DbAsyncResult result, String methodName, Boolean sendToPi
pe)
   at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
   at MsSqlSpatial.GeometryTable.ExecuteAddIndexes(SqlCommand command, String schemaName, String tableName, String colum
nName)
   at StoredProcedures.ImportFromDatasource(IProvider datasource, String schemaName, String tableName, String columnName
, Int32 srid, String type, String connectionString, ImportFromDatasourceProcess process, Int32& importedRows, TimeSpan&
elapsedTime)
   at StoredProcedures.ImportFromShapefileMain(String shapefile, String schema_name, String table_name, String column_na
me, Int32 srid, String type, String connectionString, Int32& importedRows, TimeSpan& elapsedTime)
   at MsSqlSpatialConsole.Program.ImportShp(ArgParser arg, String schema, String table, String column, Int32 srid, Strin
g type, String connectionString)
   at MsSqlSpatialConsole.Program.Main(String[] args)