This is mnoGoSearch's cache of https://lists.gambas-basic.org/pipermail/user/2008-January/017762.html. It is a snapshot of the page as it appeared during last crawling. The current page could have changed in the meantime.

Last modified: Sat, 19 Jan 2008, 23:47:22 CET    Size: 5852
[Gambas-user] Double DataSource

[Gambas-user] Double DataSource

Benoit Minisini gambas at ...1...
Sat Jan 19 23:47:22 CET 2008


On vendredi 18 janvier 2008, Nx GT-R BOY wrote:
> A days ago I got a "Void Key" (known bug), but I change my database
> structure, and now its getting better, what I am trying to do is this:
>
>    1.
>
>    I want a table, lets call "groups". where I can add profiles like
>    "root", "not root", everything goes ok, I don't have problems with that.
>    2.
>
>    I want a table, lest call "users", where I would like to add user
>    information like "name" and "password", and let the user select ONLY the
>    items that have been recorded under the table "groups" (something pretty
>    match the same than the "color" @ gambas examples)
>
> Theres no code here (talking about high level code), just change
> properties, just to check I was doing everything OK, I add to my project
> the Ftest form from the database project, and of course, change the
> properties, to work with my database, and I got the SAME behavior, that
> what I do by myself, so I started to think something about my DB.
>
> The behavior I got, its that What is ACTIVE in the form is the
> DataSource/DataBrowse of "groups", and nothing about "users", I can add
> users, but I cant see them, nothing related with "users" works, just what
> is related with "groups"
>
> The project code, its not important I guess, since the same happens with
> the Database example, so, maybe the important its the structure of my DB, I
> worked with DBDesigner 4, and this is my script file (part of it)
>
> NOTE: comparing my project to the database example @ gambas:
> groups = colors
> users = test
>
> By the way, pleas tell me the way I should send my code.
>
> CREATE TABLE grupos (
> clave VARCHAR(20) NOT NULL,
> nombre VARCHAR(20) NOT NULL,
> empleados TINYINT NULL,
> vacaciones TINYINT NULL,
> tipoproveedor TINYINT NULL,
> nomina TINYINT NULL,
> egresos TINYINT NULL,
> proveedores TINYINT NULL,
> ingresos TINYINT NULL,
> clientes TINYINT NULL,
> asistencia TINYINT NULL,
> inventario TINYINT NULL,
> tipomateriales TINYINT NULL,
> grupos TINYINT NULL,
> usuarios TINYINT NULL,
> puestos TINYINT NULL,
> PRIMARY KEY(clave)
> );
>
> CREATE TABLE usuarios (
> nombre VARCHAR(20) NOT NULL,
> grupos_clave VARCHAR(20) NOT NULL,
> clave VARCHAR(20) NOT NULL,
> PRIMARY KEY(nombre),
> INDEX usuarios_FKIndex1(grupos_clave),
> FOREIGN KEY(grupos_clave)
> REFERENCES grupos(clave)
> ON DELETE NO ACTION
> ON UPDATE NO ACTION
> );
>
> (By the way, I am Spanish native speaker, so the design is in Spanish)
>
> Regards, Nx GT-R (nxgtrturbo at ...626...

Please send your project anyway, otherwise I can't help you.

Regards,

-- 
Benoit Minisini




More information about the User mailing list