It has always bugged me that Texis is somewhat less than helpful with syntax errors. Perhaps you could print the leading and following tokens around the error. Here's an example of a really not useful error message:
<!-- 015 impdafif:8: Line 8: syntax error at "," -->
on this sql:
<sql "create table arpts (
id counter,
Geocode long,
Lat float,
Lon float,
Elev int,
Icaos varchar(10),
Name varchar,
LongRwy int,
Surface varchar(20),
Lights varchar(20),
Fuels varchar(20),
Food varchar(20),
ARPT_IDENT varchar(7)
)"></sql>
<!-- 015 impdafif:8: Line 8: syntax error at "," -->
on this sql:
<sql "create table arpts (
id counter,
Geocode long,
Lat float,
Lon float,
Elev int,
Icaos varchar(10),
Name varchar,
LongRwy int,
Surface varchar(20),
Lights varchar(20),
Fuels varchar(20),
Food varchar(20),
ARPT_IDENT varchar(7)
)"></sql>