**[Err] 1416 : GEOMETRY field in DB Query

2019-09-13 18:15发布

问题:

i want to insert some data to my DB table . my table called PatientInfo contains columns PName, DOfBirth, Telephone, Sex

i've tried this query: INSERT INTO PatientInfo (PName, DOfBirth, Telephone, Sex) VALUES ('XXXX', 28, 0111000000, 'Female');

but this error appears: [Err] 1416 - Cannot get geometry object from data you send to the GEOMETRY field

could someone help me on that...

回答1:

The LINESTRING data type is for storing spatial data. The data types for the PName and Sex columns should be a text type; VARCHAR would probably be the best data type for them.