[Gambas-user] Database problem.

Benoit Minisini gambas at ...1...
Sat Dec 29 10:57:22 CET 2007


On samedi 29 décembre 2007, R. Stormo wrote:
> Benoit Minisini wrote:
> > On samedi 29 décembre 2007, R. Stormo wrote:
> >> Benoit Minisini wrote:
> >> > On jeudi 27 décembre 2007, R. Stormo wrote:
> >> >> I'm running SQLite3 and trying to create a view from a table.
> >> >> First time it says no records (should be) Second time I run give me
> >> >> an error.
> >> >> This is what I'm doing.
> >> >> Open my database in the database manager , double click on my table,
> >>
> >> all
> >>
> >> >> is
> >> >> ok upto now.
> >> >> Select SQL
> >> >> insert this
> >> >> create view test1 as select kontakt from faktura where kontakt='some
> >> >> name that exist';
> >> >> return "no records"
> >> >> Seconds time I try it give me
> >> >> "Cannot exec request
> >> >> Query failed: SQL error or missing database"
> >> >>
> >> >> First time it should give me records. Why does it not show views if
> >>
> >> they
> >>
> >> >> are created?
> >> >>
> >> >> Regards Rohnny
> >> >>
> >> >>
> >> >> My Gambas Community http://gambasforum.tk
> >> >
> >> > Can you tell what requests you wrote exactly?
> >> >
> >> > --
> >> > Benoit Minisini
> >>
> >> All described in previous message.
> >>
> >> create view test1 as select field_in_database from database_name where
> >> field_in_database='some name that exist';
> >>
> >>
> >> return "no records"
> >>  Seconds time I try it give me
> >> "Cannot exec request
> >> Query failed: SQL error or missing database"
> >>
> >> First time when it returned no records. It should have return records.
> >> The
> >> view did not show up as a table that would be nice if it did.
> >>
> >>
> >> Regards Rohnny
> >>
> >> My Gambas Community http://gambasforum.tk
> >
> > If you create twice the same view, it is logical that you get an error
> > the second time, isn't it?
> >
> > --
> > Benoit Minisini
>
> I suppose it is ;) but why does the view not show up as a table, this way
> you can see if it's there. Strange that it does not show any records
> either.
>
> This is from a live table got from a demo project
> create view test1 as select bfield from table1 where bfield='giraffe';
> Gives "NO RECORDS"
>
> select bfield from table1 where bfield='giraffe';
> This give me 10 records. There must be something wrong someplace.
>
>
> Regards Rohnny
>
> My Gambas Community http://gambasforum.tk

There is no view support in the database component, but normally, they should 
be accessible anyway. Need some investigation...

-- 
Benoit Minisini




More information about the User mailing list