Index: fcl/db/sqlite/sqlite3ds.pas
===================================================================
--- fcl/db/sqlite/sqlite3ds.pas	(revision 1603)
+++ fcl/db/sqlite/sqlite3ds.pas	(working copy)
@@ -93,7 +93,23 @@
   ColumnStr:String;
   Counter,FieldSize:Integer;
   AType:TFieldType;
+
+
+function GetVarSize(const Param : String) : Word;
+var
+ i,j : Integer;
 begin
+ Result := 0;
+ i := Pos('(',Param);
+ j := Pos(')',Param);
+ if i = 0 then Exit;
+ Result := Word(StrToIntDef(Copy(Param,i+1,j-i-1),0));
+end;
+  
+
+
+
+begin
   FieldDefs.Clear;
   sqlite3_prepare(FSqliteHandle,PChar(FSql),-1,@vm,nil);
 	sqlite3_step(vm);
@@ -104,10 +120,11 @@
    begin
      AType:= ftInteger;
      FieldSize:=SizeOf(LongInt);
-   end else if (ColumnStr = 'VARCHAR') then
+   end else if (Pos('CHAR',ColumnStr)>0) then
    begin
      AType:= ftString;
-     FieldSize:=10;//??
+     FieldSize:=GetVarSize(ColumnStr);
+     if FieldSize=0 then FieldSize := 10;
    end else if (ColumnStr = 'BOOLEAN') then
    begin
      AType:= ftBoolean;
Index: fcl/db/sqlite/sqliteds.pas
===================================================================
--- fcl/db/sqlite/sqliteds.pas	(revision 1603)
+++ fcl/db/sqlite/sqliteds.pas	(working copy)
@@ -79,7 +79,20 @@
   Counter:Integer;
   AType:TFieldType;
   ColumnStr:String;
+
+function GetVarSize(const Param : String) : Word;
+var
+ i,j : Integer;
 begin
+ Result := 0;
+ i := Pos('(',Param);
+ j := Pos(')',Param);
+ if i = 0 then Exit;
+ Result := Word(StrToIntDef(Copy(Param,i+1,j-i-1),0));
+end;
+  
+  
+begin
  // Sqlite is typeless (allows any type in any field)
  // regardless of what is in Create Table, but returns
  // exactly what is in Create Table statement
@@ -92,10 +105,11 @@
    begin
      AType:= ftInteger;
      FieldSize:=SizeOf(LongInt);
-   end else if (ColumnStr = 'VARCHAR') then
+   end else if (Pos('CHAR',ColumnStr)>0) then
    begin
      AType:= ftString;
-     FieldSize:=10;//??
+     FieldSize:=GetVarSize(ColumnStr);
+     if FieldSize=0 then FieldSize := 10;
    end else if (ColumnStr = 'BOOLEAN') then
    begin
      AType:= ftBoolean;
