Wrox Programmer Forums
Go Back   Wrox Programmer Forums > C# and C > C# 1.0 > C#
|
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 software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old March 13th, 2007, 06:03 PM
Registered User
 
Join Date: Mar 2007
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

 
Old March 15th, 2007, 11:51 AM
Friend of Wrox
 
Join Date: Jun 2004
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...
 
Old March 15th, 2007, 03:30 PM
Registered User
 
Join Date: Mar 2007
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






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





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