CodeCharge Studio
search Register Login  

Visual Web Reporting

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

YesSoftware Forums -> CodeCharge Studio -> .NET

 calling a stored procedure

Print topic Send  topic

Author Message
dik mus
Posted: 01/12/2005, 5:51 AM

Hi,

In my project application, if a new project is created, i need to automatic add some records in another table (milestones).
I thought of creating a stored procedure (like a append query) that is called when the user clicks the save project button.

Is this the way, and if so, How can i call a stored procedure in code?

Thanks, dik
peterr


Posts: 5971
Posted: 01/12/2005, 12:00 PM

Take a look at http://www.google.com/search?hl=en&q=.net+calling+stored+procedures

A better idea may be to use database triggers as this is their main purpose.
_________________
Peter R.
YesSoftware Forums Moderator
For product support please visit http://support.yessoftware.com
View profile  Send private message
dik mus
Posted: 01/12/2005, 1:13 PM

Thanks Peter,

I think i can make the trigger, but is there a simple way to start that
trigger from css.
In the google search you refer to, i can only find quite a bit of code to
build a connection and dataadapter first.
I hoped css had something build in to make things easyer. or am I getting
too layzy using css? : )
Or could you perhaps refer to a CSS example?




"peterr" <peterr@forum.codecharge> schreef in bericht
news:841e581ee82039@news.codecharge.com...
> Take a look at
> http://www.google.com/search?hl=en&q=.net+calling+stored+procedures
>
> A better idea may be to use database triggers as this is their main
> purpose.
> _________________
> Peter R.
> YesSoftware Forums Moderator
> For product support please visit http://support.yessoftware.com
> ---------------------------------------
> Sent from YesSoftware forum
> http://forums.codecharge.com/
>

E43509

Posts: 283
Posted: 01/19/2005, 10:42 AM

I'm not sure what db you are using but this is a snippet from one of my projects to call a stored procedure on a button trigger.

Dim myConn As OracleClient.OracleConnection
Dim myCmd As OracleClient.OracleCommand
Dim myParam as OracleClient.OracleParameter

myConn = New OracleClient.OracleConnection(System.Configuration.ConfigurationSettings.AppSettings("cnTMSString"))

myCmd = New OracleClient.OracleCommand("examprocs.lock_n_grade", myConn)
myCmd.CommandType = CommandType.StoredProcedure
myCmd.Parameters.Add(New OracleClient.OracleParameter("in_test_pk", OracleClient.OracleType.Int32)).Value = System.Web.HttpContext.Current.Session("student_test_pk")

myConn.Open()
myCmd.ExecuteNonQuery()
myConn.Close()
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.

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.