473,378 Members | 1,378 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

Stored Procedure from Application_start

geo039
47
Does anyone know how I can execute a stored procedure from application
start?Seems like it would be an easy answer to find from online
reading but it's not?!
Aug 14 '07 #1
3 1168
kenobewan
4,871 Expert 4TB
Well I don't know when you'd expect the Application_Start event to fire,
but I know I don't expect it to happen very often. Under normal release
conditions it should normally pretty much only fire after you reboot the
server and someone requests the first page.
Aug 15 '07 #2
geo039
47
I guess I'm really confused now. I am a trainee developer at work and am told that I need to update the application's employee table from another table so I have a sp written then i should

1. set the application variable in the app to today
2. everytime time i load the app, check if date=today if yes don't run sp, if no run sp

I thought I needed to fire the sp, set the application date to today then in session start write the logic if date is <> now then run sp

I don't know seems to me I should just schedule a job in sql server, not even sure why i have to do it the way above.
Aug 15 '07 #3
kenobewan
4,871 Expert 4TB
I guess I'm really confused now. I am a trainee developer at work and am told that I need to update the application's employee table from another table so I have a sp written then i should

1. set the application variable in the app to today
2. everytime time i load the app, check if date=today if yes don't run sp, if no run sp

I thought I needed to fire the sp, set the application date to today then in session start write the logic if date is <> now then run sp

I don't know seems to me I should just schedule a job in sql server, not even sure why i have to do it the way above.
Sessions are created in the application, usually initiated in the web config file. However there are events that are available in the global.asax that are better suited to your purpose:
Working with the ASP.NET Global.asax file
Aug 17 '07 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: dinesh prasad | last post by:
I'm trying to use a servlet to process a form, then send that data to an SQL server stored procedure. I'm using the WebLogic 8 App. server. I am able to retrieve database information, so I know my...
0
by: Nashat Wanly | last post by:
HOW TO: Call a Parameterized Stored Procedure by Using ADO.NET and Visual C# .NET View products that this article applies to. This article was previously published under Q310070 For a Microsoft...
3
by: Rhino | last post by:
I've spent the last couple of hours trying to figure out how to debug a Java stored procedure and am just going in circles. The last straw came when I got "Cannot open input stream for default"...
4
by: Rhino | last post by:
Is it possible for a Java Stored Procedure in DB2 V7.2 (Windows) to pass a Throwable back to the calling program as an OUT parameter? If yes, what datatype should I use when registering the...
8
by: Thomasb | last post by:
With a background in MS SQL Server programming I'm used to temporary tables. Have just started to work with DB2 ver 7 on z/OS and stumbled into the concept of GLOBAL TEMPORARY TABLE. I have...
2
by: Dino L. | last post by:
How can I run stored procedure (MSSQL) ?
0
by: Amber | last post by:
Stored procedures are faster and more efficient than in-line SQL statements. In this article we will look at two SQL Server stored procedures; one using an input parameter and one not, and see how...
7
by: Dabbler | last post by:
I'm using an ObjectDataSource with a stored procedure and am getting the following error when trying to update (ExecuteNonQuery): System.Data.SqlClient.SqlException: Procedure or Function...
2
by: jed | last post by:
I have created this example in sqlexpress ALTER PROCEDURE . @annualtax FLOAT AS BEGIN SELECT begin1,end1,deductedamount,pecentageextra FROM tax
2
geo039
by: geo039 | last post by:
Does anyone know how I can execute a stored procedure from application start?Seems like it would be an easy answer to find from online reading but it's not?!
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.