ContentValues values =
new
ContentValues();
values.put(DriveEntity.StartTime,nowTime);
values.put(DriveEntity.EndTime,nowTime);
values.put(DriveEntity.Distance,
0
);
values.put(DriveEntity.StartPointLat,pDWH.mGPS.GetWgsWE());
values.put(DriveEntity.StartPointLon,pDWH.mGPS.GetWgsNS());
values.put(DriveEntity.EndPointLat,pDWH.mGPS.GetWgsWE());
values.put(DriveEntity.EndPointLon,pDWH.mGPS.GetWgsNS());
db.insert(DriveEntity.TABLE_NAME,
null
,values);
Cursor c = db.query(DriveEntity.TABLE_NAME,
null
,
null
,
null
,
null
,
null
,
null
,
null
);
c.moveToFirst();
while
(c.moveToNext()){
Log.e(
"id"
, c.getString(c.getColumnIndex(
"_id"
)));
Log.e(
"StartTime"
, c.getString(c.getColumnIndex(
"StartTime"
)));
Log.e(
"EndTime"
, c.getString(c.getColumnIndex(
"EndTime"
)));
Log.e(
"Distance"
, c.getString(c.getColumnIndex(
"Distance"
)));
Log.e(
"StartPointLat"
, c.getString(c.getColumnIndex(
"StartPointLat"
)));
Log.e(
"StartPointLon"
, c.getString(c.getColumnIndex(
"StartPointLon"
)));
Log.e(
"EndPointLat"
, c.getString(c.getColumnIndex(
"EndPointLat"
)));
Log.e(
"EndPointLon"
, c.getString(c.getColumnIndex(
"EndPointLon"
)));
Log.e(
"--------"
,
"-------------------------"
);
}