I'm missing something here - here is a brief snippet showing what I'm
trying to do, with "db" a SQLiteDatabase object:

  ContentValues values = new ContentValues();
  values.put(KEY_DATE, "julianday('now')");
  return db.insert(TABLE_NAME, null, values);

The KEY_DATE column is an integer column, but when I browse the data,
it looks like the String "julianday('now')" is in the database.

How is that possible - I would hope trying to set a string value into
an integer column would cause an error.

Is there a way to do this with passing the SQL function through
insert? I know I could compute the value in Java and pass that, or
issue a raw query and deal with the cursor; I'm trying to understand
how this works.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to