CodeCharge Studio
search Register Login  

Web Reporting

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

YesSoftware Forums -> CodeCharge Studio -> General/Other

 Action Queries

Print topic Send  topic

Author Message
BForbes
Posted: 01/11/2006, 5:51 PM

Is there a way to perform action /update queries on Access databases with CCS?

Thanks,
Brent
BForbes
Posted: 01/12/2006, 8:02 AM

I'd to clarify my original question / posting:

I have a field in an Access table called "price". I would like to update all the records in that field at once with a 10% price increase.

I would like to place an input box for that field where I would enter 10% or whatever percentage I choose, press a submit button and it increases the values in that field by that percentage.

Is there a function in CCS that allows you to do this? I looked at the editable grid but I did not see where I could update all the records at one time without having to go recrod by record to input the increased value.

Any help would be appreciated.

Brent
Walter Kempees
Posted: 01/12/2006, 10:50 AM

This what I meant when I posted BatchProcedure in CodechargeStudio.wishes
forum thread.
No this not possible in a standard or action fashion Bill sorry.

Unless someone betters me, I think (know) you cannot.
The only way I know is to write a custom SQL update

$db = new clsDByourconnectionname();
$sql = "Update table set price = price *1.10";
$db->query($sql);
$db->close();

and execute that for instance by adding a button to your grid and stuff the
code in the Events of that button.
That will do the trick.

(PhP based code)

Greetz
Walter







"BForbes" <BForbes@forum.codecharge> schreef in bericht
news:243c67d867f324@news.codecharge.com...
> I'd to clarify my original question / posting:
>
> I have a field in an Access table called "price". I would like to update
> all
> the records in that field at once with a 10% price increase.
>
> I would like to place an input box for that field where I would enter 10%
> or
> whatever percentage I choose, press a submit button and it increases the
> values
> in that field by that percentage.
>
> Is there a function in CCS that allows you to do this? I looked at the
> editable
> grid but I did not see where I could update all the records at one time
> without
> having to go recrod by record to input the increased value.
>
> Any help would be appreciated.
>
> Brent
> ---------------------------------------
> Sent from YesSoftware forum
> http://forums.codecharge.com/
>

Walter Kempees
Posted: 01/12/2006, 10:52 AM

Or, as per your text, add a button, have that call a form on 1 record of
your table, have the form contain only the percentage field
and then run previous described code with the entered percentage.


"Walter Kempees" <kempe819@planet.nl> schreef in bericht
news:dq68dk$tgm$1@news.codecharge.com...
> This what I meant when I posted BatchProcedure in CodechargeStudio.wishes
> forum thread.
> No this not possible in a standard or action fashion Bill sorry.
>
> Unless someone betters me, I think (know) you cannot.
> The only way I know is to write a custom SQL update
>
> $db = new clsDByourconnectionname();
> $sql = "Update table set price = price *1.10";
> $db->query($sql);
> $db->close();
>
> and execute that for instance by adding a button to your grid and stuff
> the code in the Events of that button.
> That will do the trick.
>
> (PhP based code)
>
> Greetz
> Walter
>
>
>
>
>
>
>
> "BForbes" <BForbes@forum.codecharge> schreef in bericht
>news:243c67d867f324@news.codecharge.com...
>> I'd to clarify my original question / posting:
>>
>> I have a field in an Access table called "price". I would like to update
>> all
>> the records in that field at once with a 10% price increase.
>>
>> I would like to place an input box for that field where I would enter 10%
>> or
>> whatever percentage I choose, press a submit button and it increases the
>> values
>> in that field by that percentage.
>>
>> Is there a function in CCS that allows you to do this? I looked at the
>> editable
>> grid but I did not see where I could update all the records at one time
>> without
>> having to go recrod by record to input the increased value.
>>
>> Any help would be appreciated.
>>
>> Brent
>> ---------------------------------------
>> Sent from YesSoftware forum
>> http://forums.codecharge.com/
>>
>
>

BForbes
Posted: 01/12/2006, 11:05 AM

Yes, that would be an excellent feature. Especially if you are building an ecommerce type site, or lets say, updating employee records and giving them a percentile increase in salary. Its a very simple thing to do in MS Access using action queries and would be nice to use the funtion with CCS so that this could be done web-based.

Thanks for the sample code above, but this will be an ASP based site.
Walter Kempees
Posted: 01/12/2006, 11:10 AM

Different language, same technique.
Have fun.

"BForbes" <BForbes@forum.codecharge> schreef in bericht
news:243c6a85cef841@news.codecharge.com...
> Yes, that would be an excellent feature. Especially if you are building an
> ecommerce type site, or lets say, updating employee records and giving
> them a
> percentile increase in salary. Its a very simple thing to do in MS Access
> using
> action queries and would be nice to use the funtion with CCS so that this
> could
> be done web-based.
>
> Thanks for the sample code above, but this will be an ASP based site.
> ---------------------------------------
> Sent from YesSoftware forum
> http://forums.codecharge.com/
>

peterr


Posts: 5971
Posted: 01/12/2006, 10:29 PM

Hi,
Batch processing is different from executing a single query. At leat I think that implementing one doesn't force the need for the other.
Executing single query is almost as simple in CCS as it is in MS Access. You can actually design that query in Access then copy and paste SQL into CCS as shown in the example above. CCS documentation also has a section titled "Execute Custom SQL", which shows how to do this in each programming language.
_________________
Peter R.
YesSoftware Forums Moderator
For product support please visit http://support.yessoftware.com
View profile  Send private message

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.

MS Access to Web

Convert MS Access to Web.
Join thousands of Web developers who build Web applications with minimal coding.

CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


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