On Aug 1, 2008, at 7:32 AM, DG wrote:

> I am using SQLite 3.6.0 under Windows. I created a table using the
> following schema:
>
> CREATE TABLE CurrentValues (
>  Time_Stamp DATETIME DEFAULT CURRENT_TIMESTAMP,
>  Sensor_ID WORD DEFAULT 1 NOT NULL,
>  Sensor_Name VARCHAR(20),
>  Sensor_Type VARCHAR(8),
>  Sensor_Value FLOAT DEFAULT 0 NOT NULL,
>  Sensor_Units VARCHAR(15) DEFAULT 'NotSet' NOT NULL,
>  Location VARCHAR(20),
>  Alarm LOGICAL DEFAULT False,
> PRIMARY KEY (Sensor_ID));
>
> Initially the default values for Time_Stamp and Alarm worked as  
> expected
> but Sensor_Value and Sensor_Units inserted nothing at all.
>
> I changed the Sensor_ID's type from WORD to INTEGER and this column  
> now
> inserts the default value. I changed the Sensor_Units' type to TEXT  
> and
> it made no difference.
>
> Can anyone see why my default text value doesn't work?


It works fine when I try it.  What does your INSERT statement look like?

D. Richard Hipp
[EMAIL PROTECTED]



_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to