I wish to store the CarLocation in DB so when user click save, it will be saved on the DB, and when he open the app again, I can point to the car based on the saved location
but when I write this:
CarLocation = (Cursor1.GetString("CarLocation"))
The SQL getstring() will treat the data stored in the DB as a string, which you are trying to assign to an object.
This could be a tricky one, as location is an object I don't know what is written to the database when you add it, it may be a representation of the object or just a pointer to it.
If you're lucky and the object is written then getblob may work.
If it's just the pointer then you will have to find a way to convert the object first.
I'm sure Erel will be able to give you a definitive answer.
Edit:
Having looked at the location object, it shouldn't be too much work to create a delimited string representation and store that, then recreate the object after reading.
As written above, when you store the Location object to the database as string it stores the string representation of this object which is not useful. You can try: Log(MyLocation) to see it.
Later you cannot convert this string to a location object. Instead you should write a small method that converts the location to a string and another method to convert the string to a location object.