Is it possible to get an asp.net code (preferably vb.net) to query a sql server for results, but for it to somehow wait for a response from the server when a change is found in the records without resorting to server intensive loops?For example, I want to write a query which checks the date of a record, if the date is different from last known date, only then should the query return the results.
Let's say I have items in my WinForms application which have an expiration date. I have more different conditions than this one but let's do it simple. I'd like to trigger an event when an item comes to expiration. What is the ideal way to do so? Checking every X minutes?
I'm creating a Process Control application that will save various data fields to SQL Server 2005. Part of the data will be input via a VB hand-held application which was created on the CE 5.0 - we are running VB.NET 2.0 on Visual Studio 2005. The rest of the data will be collected via plant equipment which will interface will PLCs on the production floor. There are approximately 25 different attributes which will be stored in a SQL server table.
The user wants me to create 3 alert levels that will involve: 1) Checking to see IF a reading was manually input. 2) Checking to see if the value passed or failed.
The FIRST alert involves notifying the operator via the hand-held or some other technique. The SECOND alert involves checking back after a set time interval (15 minutes, 30 minutes, etc.) to see if the attribute passed or failed and then taking a higher action - such as an email, text message or phone call to a higher level manager. If the second check fails, the same escalation process continues with the THIRD alert level - and another action takes place such as a message being sent to yet a higher level manager.
Presumably, once the status check passes, the alert level is re-set back to 0. But I'm thinking that the process that checks for the failed attributes will need to continue to run in the background - probably at set intervals. I'm not sure if the functionality for this is something that would be best handled by VB.NET or SQL Server...
For testing purposes, I write a lot of alerts and error messages into a .txt file (some 15 entries per second). At the end of the day, the txt file becomes very large. I am now getting confronted with data loss in my application (threads indicated as being busy). Could it be that my entries in the Log.txt are slowing down my application to the point that the latter becomes unstable ?
An action that I'm trying to automatically complete on a web page requires me to click "Yes" on a JavaScript alert box. Obviously the entire process cannot be automated unless the program clicks "Yes" or "No" for the user. Is there any way that I can capture this alert box and click "Yes" programmatically?
I have been trying to implement the jQuery weekcalendar using .net. What I can't seem to figure out is why weekcalendar states events.events is undefined after I make an ajax call to a webmethod I created which returns JSON. Below is the relevant code:
I know that LINQ queries are deferred and only executed when the query is enumerated, but I'm having trouble figuring out exactly when that happens.Certainly in a For Each loop, the query would be enumerated.What's the rule of thumb to follow? I don't want to accidentally enumerate over my query twice if it's a huge result.
For example, does System.Linq.Enumerable.First enumerate over the whole query? I ask for performance reasons. I want to pass a LINQ result set to an ASP.NET MVC view, and I also want to pass the First element separately. Enumerating over the results twice would be painful.It would be great to turn on some kind of flag that alerts me each time a LINQ query is enumerated. That way I could catch scenarios when I accidentally enumerate twice.
I created a control that has picture box control docked within it. This control allows me to "animate" the image by swapping them out by setting the interval to swap them at. I want to use this control kind of like an animated icon within a application, but because the picture box is docked, the control I created won't respond to the events, MouseHover specifically. [Code]
I don't know how to use these events and get the appropriate values out of these events ....here is some code that I have copied from a website...
[code] Private Function MouseHookProc(ByVal nCode As Integer, ByVal wParam As Integer, ByRef lParam As MSLLHOOKSTRUCT) As Integer Try If nCode >= 0 Then Select Case wParam
is there a difference between shared events and non-shared events?
Private Shared Event EVENT_something_changed() Private Sub SUB_handles_something_changed() Handles Me.EVENT_something_changed End Sub
no errors with this code, but how is Me possible since the Event is shared. it seems like there's no errors between switching shared with un-shared and switching Me with Myclass, all 4 combinations seem to work, isn't that weird
I'd like to be able to access the events in a C# DLL so I can display a Progress Bar as the file analysis is carried out - the DLL is written by a third party using VB.Net.
Details C# FileAnaysis.DLL Contains a public class FileManager which contains 2 public subs public void ProgAnalysis(string fileName) public void ProgAnalysis(string fileName, ProgressChangedEventHandler progressChangedEventHandler, RunWorkerCompletedEventHandler runWorkerCompletedEventHandler)
How do I access the events generated by second sub in Vb.Net?
I find that I write a lot of code within my classes to keep properties in sync with each other. I've read about Events in Classes, but have not been able to wrap my head around how to make them work for what I'm looking for.For example, in this one I always want to keep myColor up to date with any change whatsoever in any or all of the Red, Green or Blue properties.
Class myColors Private Property Red As Byte Private Property Green As Byte
[code]....
If one or more of those changes, I want myColor to be updated. Easy enough as above, but is there a way to work with events that would automatically do this so I don't have to put myColor = Color.FromArgb(Red, Green, Blue) in every sub routine?
I am a VB programmer working my way into C#. I learned how to create and raise events in vb and am finding that it isnt done the same way in C#. Has anybody come across an article that will help me to understand how to do events in C# and maybe explain why it is different in VB.
I'm calling the SQLDMO 8.0 COM library from VB.NET (using a PIA I generated with tlbimp) in order to backup a database with percentage completion notification:
Dim server As SQLDMO.SQLServer = Nothing Dim backup As SQLDMO.Backup = Nothing Dim restore As SQLDMO.Restore = Nothing Dim backupAbortable As Boolean Dim restoreAbortable As Boolean
im using webbrowser control and html code in my project my question is how to see other invokemember events like ("Click") is there any complete list of events,
I'm wondering if is it possible that the events for a certain object will be executed by another events under a different object?For example.I have a button named Button1, and I have a ListView named lstView. What I want is that when I click on Button1, the events that will be executed will be the one under lstView.
Here are my codes:
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click lstView_KeyPress(Button1, e) 'This is the part where I don't know what to do. End Sub
I have a windows application which raises a particular event.I need to create a COM callable class whic will allow VB 6.0 to subscribe to this event.I have done a fair amount of research on this and am confused as hell.
It looks like theres a bunch of threads with these issues. Mine has to do with events and event handing in an add-in...so its a bit complicated for me.I'm trying to rewrite this C# code
#region Event Handling /// <summary> /// Wires up events from xWeb and this plugin /// </summary>
[code]....
I have no idea where the type AddinActiveDocumentChanged and the type DocumentEventHandler is coming from. Intellisense doesn't have these. So both of those sub routines I'm stopped at.
for example, i have button1, label1, label2. let say i put a audio1.wav play on label1.click event, and audio2.wav play on label2.click event.can i call both label1.click and label2.click event at button1.click event. in this way maybe both of the audio can play at the same time.