|
Home > Archive > dBASE Web Applications > October 2005 > Problem with sql select statment
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Problem with sql select statment
|
|
| Claus Mygind 2005-10-11, 7:27 am |
| I am desperate enough to post this emil in both news groups.
In working with MySQL tables, the following select statment works fine in
the sql designer and returns the rowset I want:
Select j.jobid, g.jobid, j.prjctname From job j, geotech g Where (j.jobid
= g.jobid) And g.id = 'CONC0001')
However when I plug it into my app, like this:
q = new QUERY()
q.database = db
q.sql = [Select j.jobid, g.jobid, j.prjctname From job j, geotech g Where
(j.jobid = g.jobid) And (g.id = 'CONC0001')]
q.active = true
I get an error "Database Engine Error: Table is read only." Why is that?
And how would I write a simple sql statment that sets a relationship between
two files and returns a rowset?
| |
| David Ball 2005-10-11, 7:27 am |
| Hello Claus
Try adding the line
q.requestLive=false
before the q.active=true.
Happy Thanksgiving
David Ball
www.ChelseaData.ca
"Claus Mygind" <cmygind@tsccorp.com> wrote in message
news:LkdKEubzFHA.1304@news-server...
> I am desperate enough to post this emil in both news groups.
>
> In working with MySQL tables, the following select statment works fine in
> the sql designer and returns the rowset I want:
>
> Select j.jobid, g.jobid, j.prjctname From job j, geotech g Where
(j. jobid
> = g.jobid) And g.id = 'CONC0001')
>
> However when I plug it into my app, like this:
>
> q = new QUERY()
> q.database = db
> q.sql = [Select j.jobid, g.jobid, j.prjctname From job j, geotech g
Where
> (j.jobid = g.jobid) And (g.id = 'CONC0001')]
> q.active = true
>
> I get an error "Database Engine Error: Table is read only." Why is that?
> And how would I write a simple sql statment that sets a relationship
between
> two files and returns a rowset?
>
>
>
| |
| David Kerber 2005-10-17, 1:26 pm |
| In article <MbZpQcczFHA.1044@news-server>, Thanks.But@NoSpam.4.me
says...
> Hello Claus
>
> Try adding the line
>
> q.requestLive=false
>
> before the q.active=true.
That is the fix. The reason you need it is that the BDE makes *all*
JOINs read only, even though many database engines do not do so.
.....
--
Remove the ns_ from if replying by e-mail (but keep posts in the
newsgroups if possible).
| |
| Claus Mygind 2005-10-17, 1:26 pm |
| Thanks both Davids
I was so desperate that I also posted this in the other newsgroup and Ken
gave me the same reply. I do remember reading that a while back somewhere.
When it comes to updating the tables I can pretty much assume that I will
need to open a new query for each table to be updated. This is still a
bridge a little ways down the road.
"David Kerber" < ns_dkerber@ns_Warren
RogersAssociates.com> wrote in message
news:MPG. 1db817fceefee2d3989d
5e@news.dbase.com...
> In article <MbZpQcczFHA.1044@news-server>, Thanks.But@NoSpam.4.me
> says...
>
> That is the fix. The reason you need it is that the BDE makes *all*
> JOINs read only, even though many database engines do not do so.
>
> ....
>
> --
> Remove the ns_ from if replying by e-mail (but keep posts in the
> newsgroups if possible).
|
|
|
|
|