Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Shaun E on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Stored Procedure

Status
Not open for further replies.

desireemm

Technical User
Dec 17, 2003
50
US
I need to create a stored procedure that will pop up as a report or whatever. I need it to pop up when the users open up the database, it will show them that a Finding needs to be tended to and until they close this finding is closed out (drop down window) it will continue to pop up. The stored procedure needs to be based on the date the report was sent to the department which would be the "DateSubmitted" (which has a datatime data type). I need it to populate another datetime field with a date thats 120 days for the DateSubmitted. Does that make sense??
 
Not very much.
-Karl

[red] Cursors, triggers, user-defined functions and dynamic SQL are an axis of evil![/red]
[green]Life's uncertain...eat dessert first...www.deerfieldbakery.com[/green]
 
ok so dounutman that doesnt make sense to you is that what your saying??

I need to create a trigger or a stored procedure that will pop up when the users open up the database. it needs to be based on the DateSubmitted and if the Findings Field says "Yes". And as soon as the findings field says no then it will stop popping up. The reason for the datasubmitted is due to the amount of time they have to correct the findings, which will calculate 120 days from the DateSubmitted
 
dont think RDBMS were designed to do this type of thing - but hey I am here to be proved wrong :)

[bandito] [blue]DBomrrsm[/blue] [bandito]
 
This appears to be a programming question as in VB, C# or whatever. A stored procedure can make the determination of whether or not a certain condition exists within the table, but you need to have the application call that SP and then the application either pops up a warning or not.
If you need help with a SP to check for the condition, then tell us more about the table and the 120 day thingy. Otherwise you should post in the appropriate forum for the language of choice.
-Karl

[red] Cursors, triggers, user-defined functions and dynamic SQL are an axis of evil![/red]
[green]Life's uncertain...eat dessert first...www.deerfieldbakery.com[/green]
 
Ok the 120 day should be calculated and populated into another field called duedate which I need to show up in a report that turns on when the database is opened. like a Extended stored procedure. So lets say the DateSubmitted is 1/28/05 add that by 120 days I think that would requre the DATEADD function. Now populating that into the DateDue field should be no problem, I just need to make it pop up when the users enter the database until the Findings are closed
 
i think the part that we are having trouble communicating to you is that sql server, unlike access, doesn't "open"

furthermore, the database, being on a separate server, cannot pop anything up on the client machine

use application code for this purpose

rudy | r937.com | Ask the Expert | Premium SQL Articles
SQL for Database-Driven Web Sites (next course starts March 6 2005)
 
Hey, rudy, I don't use access very often. What do you mean by the way access might "open"?
-Karl

[red] Cursors, triggers, user-defined functions and dynamic SQL are an axis of evil![/red]
[green]Life's uncertain...eat dessert first...www.deerfieldbakery.com[/green]
 
when you open an access database, there are all sorts of things that can be launched -- modules (code), forms, a "dashboard" etc.

but note: this is "access the application front end" that is opening, not "access the database"

unfortunately, most access users do not understand the difference between a frontend and a database, simply because in access these are one and the same

rudy | r937.com | Ask the Expert | Premium SQL Articles
SQL for Database-Driven Web Sites (next course starts March 6 2005)
 
Ahh, they're one and the same! I never realized I was approaching Access from the front end, I've always thought I was doing it from the back end. No wonder I have two children. [rofl2]
-Karl

[red] Cursors, triggers, user-defined functions and dynamic SQL are an axis of evil![/red]
[green]Life's uncertain...eat dessert first...www.deerfieldbakery.com[/green]
 
No I am aware of Access front end I was just wondering if I could create a stored procedure that would open a report in acess, but if thats not possible then nevermind. I can launch in access, just like I launch my switchboard so users can get to the forms I've created. I thought maybe there was a xp_procedure that would send a report to the users that a finding is still open. Maybe by email perhaps not just by opening the database, but it could come from the database. With a date it started and the deadline date and the departments they must remind or stay in contact with that has the findings. Thats all
 
Well, you can get crazy, but I'm not going there. Consider creating scheduled jobs at the client which occasionally checks the server.
-Karl

[red] Cursors, triggers, user-defined functions and dynamic SQL are an axis of evil![/red]
[green]Life's uncertain...eat dessert first...www.deerfieldbakery.com[/green]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top