473,776 Members | 1,645 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How do I refresh an in-memory table?

Hi,

I've got a global in-memory table which is kind of a control table for a lot
of processes. I've added quite a few non-persisted properties to the row
objects in memory, such as collections of threads, etc., which are
dynamically populated.

Here's my basic issue. I'd like to monitor the source table in the database
and pull in new rows that might have been created in different processes. I
don't want to just re-fill the data table, because I've got all these other
objects attached to the rows.

Anyway, I tried to do this with brute force. I created a new table, filled
it with the current data, looped through the rows till I found one that
wasn't in my in-memory global control table, and then...

well, what, exactly? C# wouldn't let me just add a row from one table to the
other, and there's no row.clone method. So I added a row by calling the
generated Add method whose signature contains a parameter for each field
value. But then when I tried to update the record (with a table adapter's
Update method, using the row as parameter), I got a "duplicate key" error.
Apparently, the table adapter is trying to insert a new record instead of
updating the old.

Well, I worked around this by *deleting* the original record after copying
it's info into the in-memory table, and then calling Update inserted a new
record without a key conflict. But this seems like the ugly way around. Is
there an easier or at least less klutzy way of doing this? Thanks.

--
Warren Sirota
www.wsdesigns.com
Dec 12 '06 #1
0 1750

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
2954
by: Rick | last post by:
Hi folks, I have a web page I wrote for a class assignment (which I embellished a little) that doesn't seem to work on all browsers, platforms, etc. The problem appears to be that the page doesn't refresh completely when the page calls it self. The refresh (which should happen when the form action fires) should reload a file into an iFrame, but it doesn't. I do have 3 submit buttons on one form, but it works well for me. On the...
9
4923
by: Mark | last post by:
I have a working PHP/MySQL application used for data entry. The data entry screen includes a "Save" button. The PHP code for this button looks like this: if (isset($_POST)) { if ($_POST == "") { include ("InsertRecord.inc"); // Insert new record }
4
5494
by: Noel Wood | last post by:
Hello, I have a problem that I'm sure is simple but I have searched the newsgroup and have not found it posted before so I apologize if it has been asked heaps of times before. I have a page that list all current orders from customers. Customers can order at any time. I have a checkbox beside each listing so that as each order is complete it can be ticked off. I want the page to refresh every 2 mins so I have added .... <meta...
3
9405
by: Jack Wright | last post by:
Dear All, I would like to disable the Refresh events like (F5, Ctrl+R, RightClick Mouse + Refresh, Ctrl+N)... I have been able to solve F5 and RightClick Mouse + Refresh...how to I trap or ignore Ctrl+R or Ctrl+N... Please help TALIA
4
3086
by: Tim::.. | last post by:
Can someone please tell me why the following dynamic refresh doesn't work! Thanks Inline code... <!----- dynamically filled META REFRESH element -----> <meta id="mtaRefresh" runat="server" /> ...CodeBehind
7
22737
by: Brian | last post by:
hello, I am looking for a way to auto refresh a web page that I created, but also let the user choose to stop the auto refresh. I can not figure out how to stop the auto refresh. Any help would be appreciated. Thanks, Brian
1
2266
by: achoo | last post by:
Is it possible to extend a Web service proxy so that it understands an HTTP refresh page? Explanation: * The Web service proxy was autogenerated by Visual Studio .NET 2003 from the Web service's WSDL. It inherits from System.Web.Services.Protocols.SoapHttpClientProtocol. * The Web service is hiding behind a load-balancing content switch
3
2257
by: martin1 | last post by:
Hi, All, is there anyway to refresh window-based application every minute? it is like web-based application refresh by setting up <meta-equiv="refresh" content ="60">. Thanks
5
3207
by: Kaante | last post by:
Hi, I basically have two frames on my page, the top one contains users stats and the bottom frame contains the website. I want to have a message icon on the top frame which would flash once the user gets a new message. Obviously I would have one message icon which doesn't flash and another which does. Right now i refresh the top frame every 30 seconds so that the stats update. But is there an easier way to refresh? I mean right now the...
3
1810
by: =?Utf-8?B?cm9kY2hhcg==?= | last post by:
hi all, i betcha here's a question never asked before ;) i have a simple web form with a gridview and a button. the button doesn't do anything but a postback. i load up the gridview from the database, hit the button, then hit the refresh button and here's where my question occurs. I get a message saying that "it needs to resubmit/resend the data?" what is happening here and how do I resolve this undesired message?
0
9628
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9464
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10289
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10120
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10061
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8952
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6722
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5367
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5493
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.