CJLopez
CJLopez

Reputation: 5815

SQL logic error or missing database for Blackberry

I'm fairly new with SQLite for Blackberry, and i'm testing my program, tryign to implement SQLite, but i don see the problem on this query

CREATE TABLE 'LECGRAL'('ID_LEC' TEXT  NOT NULL,
'ID_LECTURISTA'    TEXT,
'COD_UNICOM'       TEXT  NOT NULL,
'RUTA'             TEXT  NOT NULL,
'ITINERARIO'       TEXT  NOT NULL,
'CICLO'            TEXT  NOT NULL,
'ESTADO'           TEXT  NOT NULL,)

SQL logic error or missing database is the erro i'm getting. Any idea why?

Upvotes: 0

Views: 835

Answers (1)

mu is too short
mu is too short

Reputation: 434645

I think the trailing comma:

'ESTADO'           TEXT  NOT NULL,)
                                 ^ Right here

is the source of your trouble. As an aside, you don't need to quote those column or table names, this:

CREATE TABLE LECGRAL(
    ID_LEC           TEXT  NOT NULL,
    ID_LECTURISTA    TEXT,
    COD_UNICOM       TEXT  NOT NULL,
    RUTA             TEXT  NOT NULL,
    ITINERARIO       TEXT  NOT NULL,
    CICLO            TEXT  NOT NULL,
    ESTADO           TEXT  NOT NULL
)

should be okay.

Upvotes: 3

Related Questions