CodeCharge Studio
search Register Login  

Web Reports

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

YesSoftware Forums -> CodeCharge Studio -> ASP

 execute stored procedure on page load

Print topic Send  topic

Author Message
mikecou
Posted: 01/06/2004, 12:25 PM

I am grying to execute a stored procedure in code charge studio when my page loads. I call the proc and supply two dates to it
usp_report0011 '10/18/2003', '11/10/2003'

I would like to execute this code and possibly have the dates as variables pulled from the querystring. I cannot figure an easy way to do this. I am converting my site from codecharge to studio so I don't have all the studio code memorized yet and am not totally familiar with it. Any help would be appreciated.

thanks

mike
Edd


Posts: 547
Posted: 01/06/2004, 1:34 PM

mike,

There are a number of ways you can do this.
1. On the "BeforeBuildSelect" Event you can change the Parameter (in this case MyDate) the following way - Note CCS prefixes URL variables with "url".
----------------------------------------------
If IsEmpty(Request.QueryString("MyDate") Then
LocalMyDate = Date
MyGrid.DataSource.Parameters("urlMyDate") = LocalMyDate
End If

2.You can set default parameters in the parameter section by entering a fixed value OR as I often do calling a function which returns the value.

3. If you are using Microsoft SQL you can pass a null and let the stored procedure take the default.

Hope this helps.

_________________
Accepting and instigating change are life's challenges.

http://www.syntech.com.au
View profile  Send private message
mikecou
Posted: 01/07/2004, 7:25 AM

Thanks for the help but I am not looking for a way to pass the variables but a way to execute the stored procedure. There is no way that I can find to actually call a stored proc when the page loads. I just want to call it with a couple variables and let it do some of the work behind the scenes.
mikecou
Posted: 01/07/2004, 7:28 AM

also if I have anything in the code for the stored proc that isn't a select, ccs says that it doesn't return a data set. any ideas on that as well?

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.