?
Solved

Real Time Programing

Posted on 2001-06-21
9
Medium Priority
?
173 Views
Last Modified: 2010-05-02
Hi,

How can I make recoredset that allways connected to DB and changing according to updates in the database.

I meen if I change the data in the table on the SQL server from other computer the recordset will update automatically.

Kind of "Online RecoredSet".

0
Comment
Question by:computech1
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
9 Comments
 
LVL 4

Expert Comment

by:nutwiss
ID: 6213568
you could just call 'requery' each time you access it...
0
 
LVL 3

Expert Comment

by:cmgarnett
ID: 6213747
How about using a timer with nutwiss' requery behind it?
0
 
LVL 70

Expert Comment

by:Éric Moreau
ID: 6214020
What is your database engine?
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 53

Expert Comment

by:Ryan Chong
ID: 6214425
<listenning..>
0
 
LVL 6

Expert Comment

by:andyclap
ID: 6215053
This is well beyond what current HTML/ASP architecture is supposed to do. But it is possible with a combination of several architectures:

You'll need to do something like:
Create a java applet which uses the Netscape extensions to allow it to talk back to the controlling page (don't forget the MAYSCRIPT)
The java app will open a socket to the web server and wait for messages. When it receives a message it will call a javascript on the webpage to update the relevant fields.
On the SQL server, you can build an activeX extension to send a message to the webserver on demand. You then link this in to update triggers on the tables you want to modify.
On the web server you create an application which can accept requests from the client web pages java apps, and process messages sent from the SQL server, sending the messages out to the client java apps.

Not exactly a simple or elegant approach, but it's more or less the only feasible way you can do this with the current internet architecture.

Anybody know if SOAP can marshall events? This would help things out a lot (in simple terms SOAP is just the java socket app thingy mentioned above, using an XML message)
0
 

Author Comment

by:computech1
ID: 6217916
andyclap

I wanna use only VB6 base on Access/SQL DB.
Don't what to mix with other architectures.

What whould happend if both users update the same record in same moment ? ?
0
 

Author Comment

by:computech1
ID: 6217926
What Whould happend if both users update the same record ?
0
 
LVL 6

Accepted Solution

by:
andyclap earned 400 total points
ID: 6218182
Ooops, I misinterpreted your question (I was browsing the ASP topic at the time and presumed you meant a web architecture).

A periodic refresh as mentioned by others above will keep your data in synch, but dynamic syncronisation across applications is not a feature of any of the database technologies available from VB. You could create your own architecture (such as using sockets as above) to do this, but it's not easy. It's pretty impressive for clients if you do manage to do this - they love "live" data. I use this in my current project but the architecture behind it is huge and very complicated.

>What whould happend if both users update the same record in same moment ? ?
It's up to you - there are two commonly used levels of protection:

Optimistic - no specific locking of records, so if two people update, both updates are applied, and the last one 'wins'. This is commonly used in conjunction with a timestamp value which is checked on the update against the original value to ensure the user is updating the version of the record that they are looking at, usually with a "Data has changed, please refresh" message if it fails.

Pessimistic - When data is retreived, the data is locked for update and cannot be displayed for update by anyone else until the data is released again. Can cause massive contention if being used in interractive screens, usually only used in single internal processing chunks. Not really viable for a web based solution at all as there is no persistant connection so you get optimistic locking anyway.


0
 

Expert Comment

by:amp072397
ID: 6783324
computech1:

You have many open questions:

http://www.experts-exchange.com/jsp/qShow.jsp?qid=20139202
http://www.experts-exchange.com/jsp/qShow.jsp?qid=20146067
http://www.experts-exchange.com/jsp/qShow.jsp?qid=20149111
http://www.experts-exchange.com/jsp/qShow.jsp?qid=20152781
http://www.experts-exchange.com/jsp/qShow.jsp?qid=20245584
http://www.experts-exchange.com/jsp/qShow.jsp?qid=20260613

To assist you in your cleanup, I'm providing the following guidelines:

1.  Stay active in your questions and provide feedback whenever possible. Likewise, when feedback has not been provided by the experts, commenting again makes them receive an email notification, and they may provide you with further information. Experts have no other method of searching for questions in which they have commented, except manually.

2.  Award points by hitting the Accept Comment As Answer button located above and to the left of that expert's comment.

3.  When grading, be sure to read:
http://www.experts-exchange.com/jsp/cmtyQuestAnswer.jsp#3
to ensure that you understand the grading system here at EE. If you grade less than an A, you must explain why.

4.  Questions that were not helpful to you should be PAQ'd (stored in the database for their valuable content?even if not valuable to you) or deleted. To PAQ or delete a question, you must first post your intent in that question to make the experts aware. Then, if no experts object after three full days, you can post a zero-point question at community support to request deletion or PAQ. Please include the link(s) to the question(s).
CS:  http://www.experts-exchange.com/jsp/qList.jsp?ta=commspt
At that point, a moderator can refund your points and PAQ or delete the question for you. The delete button does not work.

5.  If you fail to respond to this cleanup request, I must report you to the Community Support Administrator for further action.

Our intent is to get the questions cleaned up, and not to embarrass or shame anyone. If you have any questions or need further assistance at all, feel free to ask me in this question or post a zero-point question at CS. We are very happy to help you in this task!


thanks!
amp
community support moderator

2/3
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Suggested Courses

801 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question