|
|
|||||||||
|
|||||||||
|
|||||||||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Ajax Application Generator Generate database and reporting .NET Web apps in minutes. Quickly create visually stunning, feature-rich apps that are easy to customize and ready to deploy. Download Now!
|
|
#1
|
|||
|
|||
|
Hey guys, am a new member here, Im working on making a foruma nd all is going great, just a few thing to ask.
I have built my site in asp classic and whats the best way to check a database at regular intervals? It would be for the messages database and would need to execute as the user browses the site... I know javascript (interval) has some ways of doing this, but doesnt really connect with mysql. any ideas? ![]() |
|
#2
|
||||
|
||||
|
In my opinion, using the client to do anything a 'regular intervals' is not a good idea. What if there are no clients accessing the site at the moment? What if there are 300? You are not specific as to what you mean by 'check a database', but the best way to do something at a regular interval would be a stored procedure that is scheduled on the SQL Server.
__________________
Wolffy ------------------------ Teaching people to fish. |
|
#3
|
|||
|
|||
|
just a simple count(messages) query to let the user know that they have messages....
|
|
#4
|
||||
|
||||
|
Ah...just wanted to make sure you weren't talking about doing something like having the db scrub data and send e-mail's every 5 minutes or something like that.
The quick answer here I think is AJAX. An excellent example of using AJAX with a database query is found here . The only problem I can see is sending the userid via the query string might pose a security hole. |
|
#5
|
|||
|
|||
|
i was originally goign to say i looks too complex, but seeing it now, i think i might even be able to manage it, and see your point about the security too
thanks! much appreciated! |
![]() |
| Viewing: ASP Free Forums > Database > Microsoft SQL Server > General - Check database interval? |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|
|
|
|