On 03/03/2011, at 11:53 AM, Rami Abughazaleh wrote:

> Trying to insert a new row in a table that has a column specifically set to 
> the rowid data type

There is no rowid data type. To alias rowid you need to just type it as integer 
primary key.

> will cause an error message like "value cannot be null".
> 
> CREATE TABLE [test] (
>    [Id] ROWID NOT NULL,
>    [Name] nvarchar(50) NOT NULL,
>    [Value] nvarchar(256) NOT NULL
> );


You instead need:

create table "Test"
(       "Id" integer primary key not null
,       "Name" text not null
,       "Value" text not null
)
;

> INSERT INTO test (Name, Value) VALUES ('test','test');
> 
> Error:
> test.Id may not be NULL

The above schema should work fine with your insert.

Thanks,
Tom
BareFeetWare

 --
Comparison of SQLite GUI tools:
http://www.barefeetware.com/sqlite/compare/?ml

_______________________________________________
sqlite-users mailing list
[email protected]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to