[Gambas-user] problem using SQLITE3 and string fields

Benoît Minisini gambas at ...1...
Sun Jul 12 20:15:29 CEST 2009


> Hi all,
>
> I'm trying to read the f-spot database to add some tools to this program. I
> write few lines in gambas and everything worked fine but no the access to
> string fields. this is a part of the code:
>
>   Con.Close()
>   Con.Type = "sqlite"
>   Con.Host = "/home/rsalas/.gnome2/f-spot/"
>   Con.Name = "photos.db"
> TRY Con.Open()
> IF ERROR THEN
>  Message.Error("Error al conectar a la base de datos.")
>  Con = NULL
> ELSE
>   TRY TablaFicheros = Con.Exec("SELECT photos. *, tags. * FROM (photos
> INNER JOIN photo_tags ON photos.Id = photo_tags.photo_id)INNER JOIN tags ON
> photo_tags.tag_id = tags.Id ")
>   IF ERROR THEN
>      Message.Error("Error al abrir hacer SELECT base de datos.")
>   ELSE
>     TablaFicheros.Movefirst()
>     sFichero = TablaFicheros["uri"]
>     txtFichero.text = sFichero
>   ENDIF
>
> The line "sFichero = TablaFicheros["uri"]" gives the value "f" to sFichero
> but not the rest of the string. This doesn't happend with text fields. Can
> anyone help me on this?
>
> Thanks
>
> PS: Using gambas 2.8 on linux ubuntu 9.04

Can you get the real sqlite datatype of this field?

-- 
Benoît




More information about the User mailing list