[EMAIL PROTECTED] wrote:
> 
> Maybe the database has been damaged.

Possibly.

> 
> The shcema of table "CarImages" is :
> CREATE TABLE CarImages(
>  CarID char(32) NOT NULL,
>  CarNumber char(20) NULL,
>  OpTime datetime NOT NULL ,
>  TSCode char(6) NOT NULL,
>  LaneNum int NOT NULL,
>  PicBigPlate Long null,
>  PicSmallPlate Long null,
>  PicBlackWhitePlate Long null,
>  PicLane Long null,
>  Constraint CarImages_Key Primary Key (CarID)
> );
> 

The only thing I see here is that you have mixed the syntax for a column 
def constraint and a table constraint. You should use either a variation 
with a column definition with a column constraint (which can accept a 
constraint name clause);

     CREATE TABLE CarImages(
      CarID char(32) NOT NULL Constraint CarImages_Key Primary Key,
      CarNumber char(20) NULL,
      OpTime datetime NOT NULL ,
      TSCode char(6) NOT NULL,
      LaneNum int NOT NULL,
      PicBigPlate Long null,
      PicSmallPlate Long null,
      PicBlackWhitePlate Long null,
      PicLane Long null
     );

or a variation with a table constraint definition (which does not allow 
for a constraint name);

     CREATE TABLE CarImages(
      CarID char(32) NOT NULL,
      CarNumber char(20) NULL,
      OpTime datetime NOT NULL ,
      TSCode char(6) NOT NULL,
      LaneNum int NOT NULL,
      PicBigPlate Long null,
      PicSmallPlate Long null,
      PicBlackWhitePlate Long null,
      PicLane Long null,
      Primary Key (CarID)
     );

SQLite does accept the table definition as you have it written without 
any error messages, but it does not agree with the documentation. So 
there is either an error in the documentation or in the parser. You may 
want to file a bug report for this issue.

HTH
Dennis Cote

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

Reply via email to