Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > C# and C > C# 1.0 > C#
Password Reminder
Register
| FAQ | Members List | Search | Today's Posts | Mark Forums Read
C# Programming questions specific to the Microsoft C# language. See also the forum Beginning Visual C# to discuss that specific Wrox book and code.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the C# section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old March 13th, 2007, 06:03 PM
Registered User
 
Join Date: Mar 2007
Location: New Port Richey, FL, USA.
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default Connection to database

Not sure if this is the correct forum or not, but here goes.
I wrote an application in asp a while back that was designed to track employee status in a call center. There were two clients. One was for the phone operators and the other was for the supervisor. Both clients used IE. The employees would click a button to change their status. This would update a database with their name, current status, and the time that they changed their status. Each employee was able to see the status of all the other people in their group and the supervisor was able to see all the employees in the groups they were responsible for. The was a set of rules the each group had and each request to change the status was run against these rules. This was used to regulate how many people were allowed to take a break at one time, how many people were at lunch , and must importantly, when they were on the phone taking a call.
I'm trying to move this to a C# application. In asp, I was able to refresh the data by reloading the page every 30 sec. for the supervisor. I would like to know what type of connection I need for the supervisors client so that the data is updated as soon as it's changed. For instance, if employee #2 is on break, I need the supervisors client to display the amount of time that he has been on break and change his status back as soon as employee #2's status changes on his client.
Here's my question:
Is it possible to have a active connection to an SQL database so that changes are updated immediately?
And what kind of load will this put on the server?
Is this even possible?

Thanks in advance
Jim

Reply With Quote
  #2 (permalink)  
Old March 15th, 2007, 11:51 AM
Friend of Wrox
 
Join Date: Jun 2004
Location: Chennai, Tamil Nadu, India.
Posts: 449
Thanks: 0
Thanked 1 Time in 1 Post
Send a message via MSN to r_ganesh76
Default

Jim,

The connection in both the ASP and ASPX work the same way in the background. Therefore I would suggest you to do it in the same way as you were doing it in asp. ie. refresh the page on every specific interwall. Each time you do a postback, all the variables which you declare are reinitialized unless you have some static variables, which work at the application level.

My suggestion would be to open a connection in the page load and retrive all data. Reload the page in specific intervalls, which will invoke the page load again and again.

Regards
Ganesh
http://ganeshprof.blogspot.com
Find your solution here...
Reply With Quote
  #3 (permalink)  
Old March 15th, 2007, 03:30 PM
Registered User
 
Join Date: Mar 2007
Location: New Port Richey, FL, USA.
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks for the reply, but I wasn't specific enough. I'm converting it to a windows application with c#. I will probably use a system timer or something like that to refresh the data periodically.

If you know of another way, please let me know.

Thanks
Jim

Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Database Connection to Access Database reachsevar ASP.NET 2.0 Basics 1 November 28th, 2007 08:56 AM
Database Connection oneillg PHP Databases 1 October 17th, 2007 04:48 PM
Database Connection kapi.goel SQL Language 2 February 14th, 2006 07:01 PM
database connection Nitin_sharma Classic ASP Databases 1 February 8th, 2005 10:23 AM



All times are GMT -4. The time now is 06:11 PM.


Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.