CodeCharge Studio
search Register Login  

Visual PHP Web Development

Visually Create Internationalized Web Applications, Web Reports, Calendars, and more.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> PHP

 Editable upgrade with multiple tables

Print topic Send  topic

Author Message
Remy
Posted: 02/01/2004, 2:31 PM

Hello,

I need some advice on th efollowing:

I have CCS 2.2.3.60 and made a editable grid. I Then placed checkboxes on each row. Checking a checkbox and then submitting it, will increase a fields value for all selected rows with one. (similar to delete checkbox, but this checkbox increases a field value by +1 if checked)

Now i want to not show ALL rows in the table, but ONLY those records that fall under an inner join.

So i went to the form properties, and chnage the source from table, to sql and made an sql statement.

Th eproblem is that this works, but now the submit button disappears....

How can i do this ? ie, maintain the checkbox funcitonality, and still trestrict the number of shown rows by a inner join

remy
Posted: 02/01/2004, 3:07 PM

Or to put this long story short:

As soon as I make an editable grid based on two tables, with an INNER JOIN, there is no SUBMIT button, even tho i see it on the design ...

DonB
Posted: 02/02/2004, 8:18 AM

That is because the underlying query is not "updatable". You must resort to
a custom insert/update/delete specification in the grid properties. This
may sound like a lot of work but it is very easy and works perfectly. It
let's you specify the table to receive the changes. If there are multiple
tables that must be updated, then you must implement code in the
Before/After events (for insert, update and delete).

--
DonB

http://www.gotodon.com/ccbth


"remy" <remy@forum.codecharge> wrote in message
news:5401d86bc6760b@news.codecharge.com...
> Or to put this long story short:
>
> As soon as I make an editable grid based on two tables, with an INNER
JOIN, there is no SUBMIT button, even tho i see it on the design ...
>
>
> ---------------------------------------
> Sent from YesSoftware forum
> http://forums.codecharge.com/
>

remy
Posted: 02/02/2004, 11:19 AM

I was afraid that was the cause, but multiple table queries arent a problem to update in programs like Access, so i thought it cud be something else.

So, if i understand right, I must use the properties 'Custom Update Type' and 'Custom Update' from the form?

And how do i get the submit button back?

Would it be possible to give me a small example for me to work on? Im not new to SQL in general, but php/css/html i just began to learn..

remy

P.S. I tried to sign up on your webpage, but it doesnt let me login after signup and it doesnt send me a forgot password mail either :-)
DonB
Posted: 02/02/2004, 11:55 AM

I think Access may be a bit more forgiving when it has direct access to the
tables (from an Access form), but not where ADO or ODBC has to pipe the data
to/from another application. If you take the exact same SQL statement and
put it into an Access Querydef, look to see if the "*" row appears or
doesn't appear.

You are correct regarding the properties to set up for custom insert/update.
If there is still a Submit button on the form, it should appear if
insert/update is allowed. If not, you just add another button, change the
caption to Submit if needed, and it's operation to insert or update as
appropriate - all done through the Properties panel while the form is
selected in the design panel.

You might want to create a test page and recontruct the form to see if that
does work. You may have damaged the existing page in some way, which has
caused insert/update not to work. If still no luck then it's got to the the
query being not-updatable.

I did a manual activation on your id so that it will let you login.

--
DonB

http://www.gotodon.com/ccbth


"remy" <remy@forum.codecharge> wrote in message
news:5401ea2d6a2a02@news.codecharge.com...
> I was afraid that was the cause, but multiple table queries arent a
problem to update in programs like Access, so i thought it cud be something
else.
>
> So, if i understand right, I must use the properties 'Custom Update Type'
and 'Custom Update' from the form?
>
> And how do i get the submit button back?
>
> Would it be possible to give me a small example for me to work on? Im not
new to SQL in general, but php/css/html i just began to learn..
>
> remy
>
> P.S. I tried to sign up on your webpage, but it doesnt let me login after
signup and it doesnt send me a forgot password mail either :-)
> ---------------------------------------
> Sent from YesSoftware forum
> http://forums.codecharge.com/
>

precioso
Posted: 05/29/2004, 2:29 PM

remy:
sorry i wont be of any help but i need to ask you something
how do u select only those records that have been "checked" to do your update?

ive been trying to implement that on the editable grid but with no luck.

appreciate your help

cheers
Damian
Posted: 05/30/2004, 6:27 AM

Add another value called "checked". On your display grid set a "where
parameter/expression checked = yes" and you will only see those that have
been checked.
Dont display the checked field in the edit grid that the users see, only in
the frid that your admin sees.


"precioso" <precioso@forum.codecharge> wrote in message
news:540b900d736e97@news.codecharge.com...
> remy:
> sorry i wont be of any help but i need to ask you something
> how do u select only those records that have been "checked" to do your
update?
>
> ive been trying to implement that on the editable grid but with no luck.
>
> appreciate your help
>
> cheers
> ---------------------------------------
> Sent from YesSoftware forum
> http://forums.codecharge.com/
>

daaniel
Posted: 06/24/2004, 7:19 PM

Same question
Have you an example with an editable grid and 2 tables

With custom update and 2 tables emp/dept (you show the dept on each emp. Only emp is updatable):
update emp set name='kj' where noemp=$????

With code in the Before/After events :
$db.query("update emp set name='kj' where noemp=$????

Daaniel


Quote DonB:
That is because the underlying query is not "updatable". You must resort to
a custom insert/update/delete specification in the grid properties. This
may sound like a lot of work but it is very easy and works perfectly. It
let's you specify the table to receive the changes. If there are multiple
tables that must be updated, then you must implement code in the
Before/After events (for insert, update and delete).

--
DonB

http://www.gotodon.com/ccbth


"remy" <remy@forum.codecharge> wrote in message
news:5401d86bc6760b@news.codecharge.com...
> Or to put this long story short:
>
> As soon as I make an editable grid based on two tables, with an INNER
JOIN, there is no SUBMIT button, even tho i see it on the design ...
>
>
> ---------------------------------------
> Sent from YesSoftware forum
> http://forums.codecharge.com/
>



Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

PHP Reports

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.