[Gambas-user] FIELDS LIMIT?

Nx GT-R BOY nxgtrturbo at ...626...
Fri Jan 25 06:12:18 CET 2008


FIELDS LIMIT?
(by the way, how do I send code?, just attach it to this mail?)

Hi, I am having troubles with a table, my table has 54 fields (53 INT and 1
YEAR), I am trying just to write to it values like 1,2,3,4,5... to each
field, theres no manual-code, just a form, drag a datasource, databrowser
and datacontrols, the reason I need that amount of fields is because I am
going to manage a value per week, so, I need a lot of space.

Thinking about there was a lot of data to write, I delete every datacontrol,
and just try to write the first INT and the YEAR, but that "brick" my table,
and I wasn't able to read that table again (from my program, because from
console works perfect), every time I tried to open the form that calls that
table, the program crash saying I have an error at my SQL query near: 'FROM
weeks LIMIT 64' at line 1. (to solve that, I drooped the database and create
it again, then everything goes ok, until I try to write it again, then comes
the same story)

I have not idea why the "64", I check the local variables and notice iLimit
is 64, and my NULL variables are: aVal, rData, $aCol, $rData.

The stack backtrace says;
DataTable.LoadUnit.77
DataTable._get.127
(native code)
DataView.GridView_Data.187

My table structure is this:
CREATE TABLE asistencia (
empleados_numero INTEGER UNSIGNED NOT NULL,
semana1 INTEGER UNSIGNED NULL DEFAULT '0',
semana2 INTEGER UNSIGNED NULL DEFAULT '0',
semana3 INTEGER UNSIGNED NULL DEFAULT '0',
semana4 INTEGER UNSIGNED NULL DEFAULT '0',
semana5 INTEGER UNSIGNED NULL DEFAULT '0',
semana6 INTEGER UNSIGNED NULL DEFAULT '0',
semana7 INTEGER UNSIGNED NULL DEFAULT '0',
semana8 INTEGER UNSIGNED NULL DEFAULT '0',
semana9 INTEGER UNSIGNED NULL DEFAULT '0',
semana10 INTEGER UNSIGNED NULL DEFAULT '0',
semana11 INTEGER UNSIGNED NULL DEFAULT '0',
semana12 INTEGER UNSIGNED NULL DEFAULT '0',
semana13 INTEGER UNSIGNED NULL DEFAULT '0',
semana14 INTEGER UNSIGNED NULL DEFAULT '0',
semana15 INTEGER UNSIGNED NULL DEFAULT '0',
semana16 INTEGER UNSIGNED NULL DEFAULT '0',
semana17 INTEGER UNSIGNED NULL DEFAULT '0',
semana18 INTEGER UNSIGNED NULL DEFAULT '0',
semana19 INTEGER UNSIGNED NULL DEFAULT '0',
semana20 INTEGER UNSIGNED NULL DEFAULT '0',
semana21 INTEGER UNSIGNED NULL DEFAULT '0',
semana22 INTEGER UNSIGNED NULL DEFAULT '0',
semana23 INTEGER UNSIGNED NULL DEFAULT '0',
semana24 INTEGER UNSIGNED NULL DEFAULT '0',
semana25 INTEGER UNSIGNED NULL DEFAULT '0',
semana26 INTEGER UNSIGNED NULL DEFAULT '0',
semana27 INTEGER UNSIGNED NULL DEFAULT '0',
semana28 INTEGER UNSIGNED NULL DEFAULT '0',
semana29 INTEGER UNSIGNED NULL DEFAULT '0',
semana30 INTEGER UNSIGNED NULL DEFAULT '0',
semana31 INTEGER UNSIGNED NULL DEFAULT '0',
semana32 INTEGER UNSIGNED NULL DEFAULT '0',
semana33 INTEGER UNSIGNED NULL DEFAULT '0',
semana34 INTEGER UNSIGNED NULL DEFAULT '0',
semana35 INTEGER UNSIGNED NULL DEFAULT '0',
semana36 INTEGER UNSIGNED NULL DEFAULT '0',
semana37 INTEGER UNSIGNED NULL DEFAULT '0',
semana38 INTEGER UNSIGNED NULL DEFAULT '0',
semana39 INTEGER UNSIGNED NULL DEFAULT '0',
semana40 INTEGER UNSIGNED NULL DEFAULT '0',
semana41 INTEGER UNSIGNED NULL DEFAULT '0',
semana42 INTEGER UNSIGNED NULL DEFAULT '0',
semana43 INTEGER UNSIGNED NULL DEFAULT '0',
semana44 INTEGER UNSIGNED NULL DEFAULT '0',
semana45 INTEGER UNSIGNED NULL DEFAULT '0',
semana46 INTEGER UNSIGNED NULL DEFAULT '0',
semana47 INTEGER UNSIGNED NULL DEFAULT '0',
semana48 INTEGER UNSIGNED NULL DEFAULT '0',
semana49 INTEGER UNSIGNED NULL DEFAULT '0',
semana50 INTEGER UNSIGNED NULL DEFAULT '0',
semana51 INTEGER UNSIGNED NULL DEFAULT '0',
semana52 INTEGER UNSIGNED NULL DEFAULT '0',
periodo YEAR NULL,
INDEX asistencia_FKIndex1(empleados_numero),
FOREIGN KEY(empleados_numero)
REFERENCES empleados(numero)
ON DELETE NO ACTION
ON UPDATE NO ACTION
);


-- 
Nx GT-R



More information about the User mailing list