Connecting To Multiple SQL Instances?

Jan 3, 2011

Any best method of managing multiple SQL connections .net (VB). My application connects to four instances of SQL Server (2000, 2005, 2008, 2008R2) restoring databases, modifying data and taking backups. In addition to managing databases the app also has its own DB (on the 2008 instance) for storing various data. I'm using two methods to connect to the instances, SMO (For backups, restoring and retrieving information about the databases, size etc) and SqlClient for querying each database for many tasks such as updating fields and executing sql scripts.I have multiple forms for performing various tasks so there are many places I'm opening / closing connections.

Would it be best to maintain a persistent global connection to each instance from the application? (Two in total, one for SMO and the other for SqlClient) or open close a connection for each task I'm performing?) I'm not using LINK as I need the tasks to be as fast as possible. The connection string will differ on each connection (Based on Instance and Database being connected to) how would I manage this? A string in the config file for the applications database would make sense, as that would be static but the databases being worked on will vary with each connection. Currently I'm creating a connection for each instance within the main form:

Dim 2000Connection = New SqlConnection("Data Source=" & SQLServerName & _
"SQL2000;Initial Catalog=Master;User ID=sa;Password=P@ssw0rd;Pooling=True;")
Dim 2005Connection = New SqlConnection("Data Source=" & SQLServerName & _
"SQL2005;Initial Catalog=Master;User ID=sa;Password=P@ssw0rd;Pooling=True;")
Dim 2008Connection = New SqlConnection("Data Source=" & SQLServerName & _
"SQL2008;Initial Catalog=Master;User ID=sa;Password=P@ssw0rd;Pooling=True;")
[Code] .....


Multiple Instances Of A Form?

Sep 13, 2010

If I create a console application for example with a class named "Person" I can create an object variable with a ceratin name only once. For example:



View 1 Replies View Related

Multiple Instances Of Class?

Mar 29, 2010

I have the following problem. (VB.Net 2008)I have created a class (myFirstClass). In this class there are a lot of calculations being made wich gets fired by events in that same class.Now i want that same class to be able to fire more instances of itself. However i noticed that each time i fire an event from a Sub the program waits till the event is finished before going to the next line of code. This is a problem since i want the event wich fires a new instance of the class to fire it and forget about it.

View 7 Replies View Related

Multiple Instances Of The Same Form?

Mar 3, 2010

I have two forms in my application. Form 1 is a listview that is populated with unique Customer IDs. When the user double click the listview on the particular Customer ID then it loads Form2. Form2 has many listviews within it such as a listview for the Customer telephone, another listview for their addresses etc and all the data presented in Form2 listviews are based on the Customer ID that the user clicked in Form1.

So here is my question...I want the user to be able to open Form2 with that particular details of the customer but also to go back to Form1 and double click another Customer ID and opens Form2 again (such as replicating Form2) with the other Customer details.So the moral of the story is i want the user to be able to have many instances of Form2 open each time they wish to view a different Customer ID without having to close Form2 down every time.

View 3 Replies View Related

VS 2008 X86, X64, PID, Multiple Instances?

Feb 6, 2010

My ultimate goal is to get a list of PIDs and have a user select 1 of them.For example: the process image name is program.exe. The application name varies for each instance the program.exe is run, and therefor each application name has its own PID associated with it. By application name I mean the Task name under the Applications tab of Windows Task Manager. Another issue I face is that some systems run x64, so the name is no longer program.exe but program.exe*32

So my issue is, how do I search for program.exe, or on x64 platforms program.exe*32, and if there are multiple instances of program.exe/program.exe*32 running, how can I get a list of PIDs for each and associated them with the application name as the Task name under the Applications tab of Windows Task Manager.that might sound a bit confusing! So if it is, please let me know and I will try to explain more. Any reference guides or example code would be greatly appriciated as I have only used the "System.Diagnostics" but once.

View 2 Replies View Related

Adding Multiple Instances Of Same Control

Jan 14, 2011

I have a control which consists of a couple of labels and a couple of buttons side by side.I want to add multiple instances of this control to a panel.The problem I have is with positioning/formatting.Whenever I add the control it just gets added on top of the previous one.Should I be using something other then a panel? Are there any tips ot tricks I should be aware of ?

View 3 Replies View Related

Checking For Multiple Instances Of Application?

Aug 30, 2010

How can I check for multiple instances of my visual basic application? When the user runs the application, I want to know how many instances are already open.

View 2 Replies View Related

Communicating Between Multiple Instances Of Application?

Mar 9, 2009

I have an application which the user can open multiple instances on the same machine. However, a section of the app would have sync problems if more than 1 instance has control over it. This is where I thought of transferring control, or sharing, between them. What should I be looking into?

They would have to be able to identify which one of them has control and to send text information over. I thought IPC or Named Pipes could do the trick, but I'm unfamiliar with them and examples seem to indicate only a single server will work. Here, I have multiple instances of the same app and every one of them needs to be able to listen for that request for control.

View 25 Replies View Related

Creating Multiple Instances Of A Form?

Aug 12, 2009

I have a form (form1) and I havea button on form1 (button1) that will start a second form (form2).How can I make it create multiple instances of form2 when button1 is clicked?i tried a process module that the studio comes as standard but it does not allow me to start multiple can i do this?

View 14 Replies View Related

Hold Multiple Instances(10) Of Alarms?

Jul 20, 2010

I have created an alarm program but am having an issue creating multiple alarms. Here is what I have so far. I have created an array to hold multiple instances(10) of alarms that I want to run concurrently.

Dim SetAlarms(7, 9) As String
Public Shared x As Integer = AlarmNumb


What I cannot figure out is how to get the program to read the array and recognize each row as a separate alarm to process. This means it must read the array, know which variables to populate with what information and cycle thru the list.

View 5 Replies View Related

Loading Multiple Instances Of One .dll In .Net 2010?

Sep 22, 2010

I'm working on a program that uses a COM Object exposed by a .dll. The .dll has a known bug, though, where it acts very erratically when more than one instance of the object is created under one .dll, resulting in crashes or corrupted data a large part of the time. I'm curious if there is some way I can load another instance of the .dll itself, then create another instance of the object without having to need a new process for every instance.

View 9 Replies View Related

Multiple Instances Of A Custom Class?

Feb 15, 2009

I have a sub that runs on a button click which I want to create a new instance of a custom class and add it to a list of already created instances of this class. I want the result to be a List Of collection of all of my class instances.

My problem is that each time I run the sub, it simply 'overwrites' the first instance of the class and adds a copy of it to the list instead of writing a new instance. My code is along these lines

dim objFixture as new clsFixture
For n As Integer = 1 To intNoOfChannels
objFixture.SetChannelAddress(n, intCurrentChannelTotal + 1)
intCurrentChannelTotal += 1

View 7 Replies View Related

Multiple Instances Of DCOM Singleton

May 19, 2011

Testing a configuration of a Windows 7 workstation acting as a "server" and a Windows XP workstation acting as a "client" (also fails in the same way using a Windows 7 client workstation).


View 8 Replies View Related

Multiple Instances Of Forms, Same Record?

Jun 22, 2009

Good Day. Kinda banging my head against the wall on this one. I have a Mdi application with the start form(mdiparent) and form1(mdichild). On the start form, there is a textbox and a button. Heres how I want it to work:

1. value is entered into textbox and button is clicked

2. if form1 is open with that value, Bring it to the front if not, create a new instance of form1

If Not IsNothing(frmForm) Then 'If it is something
If Not frmForm.IsDisposed Then 'it's not disposed
'loop through the open form1s and compare the form1s property to the startform textbox
'if its the same, bring the form1 to the front


View 3 Replies View Related

Open Multiple Instances Of Same Form?

Jul 6, 2009

I am writing an application whose main purpose will be to collect user-entered data on a prescribed time interval (to be used by a dr. during anesthesia to collect patient vitals during surgery). I am attempting to accomplish this by having a form opened from the main window on every tick of a timer. The problem, is that if the user is a bit slow in entering the data on the first window, and the timer ticks again before they submit the first form, when the form is reopened (currently by simply using a show() command), the process of opening the form again simply overwrites the original form rather than creating a second instance.What is the best way to open a second (and possibly 3rd, 4th... nth) instance of the same form?

View 4 Replies View Related

Prevent Multiple Instances Of A Form?

Jun 22, 2011

I am working on a project where i have a home form which has two buttons for login for employee and administrator.after clicking on button login form will open,but i want as soon as login window opens d previous home form must be closed or hide..also there is link on login page for home,but as soon as user click on home link new instance of home form is opening,hnce i want to stop dis multiple opening of the form.i tried close() and hide() but no use.[code]...

View 2 Replies View Related

Preventing Multiple Instances Of A Form?

Mar 29, 2009

need help please on how to prevent multiple instances of a form at runtime in vb so tha when a user clicks  a button to load a form it loads an if the user clicks the same button again whilst the other instance of the form is running it doesnt open a new one but insted sets focus on the currently running form.br2

View 4 Replies View Related

Single Form With Multiple Instances

Aug 12, 2010

I have a form which displays temperature and humidity data for a device in the field. I have multiple devices. Rather than creating a separate form for each device, obviously it is much better to have a single form that I instantiate, pass data to, and display. The devices are listed in a treeview, and when the user double-clicks the node, I create an instance of the form, pass the device's data to the instance of the form, and display the form. All of this works perfectly. However, I have a challenge: If the form for a particular device is already open, I don't want another one opened when the user double-clicks the node.

However, whenever I place logic in the program to check for the existence of the form and only allow another instance to be created if one doesn't already exist, it prevents me from creating a form instance for any other device that I may wish to view, simultaneously. So, I have a dilemma -- allow the user to display the data for multiple devices, including allowing multiple forms to be open for a single device, OR only allowing one device to be displayed at any given time.

View 2 Replies View Related

Update Datatable With Multiple Instances?

Mar 23, 2011

If the application is used with multiple users/instances adding records to the same database, whats the best practice for doing this and not incurring any conflicts with primary keys. Right now my partial solution is to do a tableadapter.fill before adding a new row to retrieve any new records. But this obviously isnt the best practical solution as the likleyhood of a conflict still exists when letting the apllication increment the key.

Whats a "correct" way to do this, any reading or examples would be great for me to learn.

View 2 Replies View Related

Working With Multiple Instances Of The Same Form

Apr 6, 2010

is they a way of keeping track for multiple instances of the same form? example saving the contents of a textbox ,the positition of the form and size when using the code below to create the new instance of the form ,i would like to save the contents of multiple form2`s from form1 ,can it be done??


View 6 Replies View Related

WPF + Communicate Between Multiple Application Instances?

Mar 20, 2010

I need to grab information between two instances of my WPF app (the contents of a public collection, to be precise).

View 2 Replies View Related

Check If Multiple Instances Of An Application Are Running?

Aug 15, 2011

I made a simple "restarter" app... However, I need to close multiple instances of an application. For example, if I have three windows of paint, or three windows of Word open, how do I check if it is still open before I open a new instance?


View 1 Replies View Related

Creating Multiple Form Instances In A Subroutine?

Aug 23, 2010

I am trying to create a subroutine that creates multiple instances of a specific form.

Here is my code:Public Sub NewFormInstance(ByVal FormName As Form)

Dim FormInstance As New FormName
End Sub

View 3 Replies View Related

Custom Setting To Save Multiple Instances

Dec 28, 2011

I have this code for custom settings:

Imports System.Configuration
Public Class setLV
Inherits ApplicationSettingsBase
Private fpListViewItems As List(Of ListViewItem)
ReadOnly Property ListViewItems() As List(Of ListViewItem)
[Code] .....

It works great for saving one Listview and its items but I need to save multiple Listviews and their items. I have no idea how to accomplish this.

View 3 Replies View Related

Keeping Multiple Form Instances Separate?

Sep 16, 2009

When I create more than one instance of the same form and I call a method on any of these instances, the code only fires on the most recently created instance. Even when I click a button on that form, it executes on the other form. How can I call these and keep them as distinct objects?

For example: if I build Form1 with a public method called ChangeMyColor and a button to call that method. Then in the main app I set MyForm1 = New Form1
and MyForm2 = New Form1, then call MyForm1.ChangeMyColor, the color changes on the second instance. Even if I click that button on the first instance, the color still changes on the second.

View 8 Replies View Related

Multiple FileStream Instances To Access 1 File?

Jun 22, 2011

I have written some simple codes which are using FileStream to read a big .zip file.My codes ran fine as expected until I tested to create multiple threads to access that particular same .zip file at the same time.

The error that I've got was > The process cannot access the file 'D:' because it is being used by another process.Is it possible to read 1 particular file by multiple FileStream instances at the same time?


View 2 Replies View Related

Multiple Instances Of A Single Control On A Form

Apr 6, 2012

I've got two sets of lists with nearly 800 items that I need in 32 different drop down comboboxes (before you ask, that is required and it can't be simplified). Understandably, populating each of them slows down the creation of the form. This happens to be a child form that these drop downs are on and there could be more than one child form displayed. I've assembled the lists in List(Of String) objects and set each of the datasources of the comboboxes appropriately, but it still takes several seconds for them to populate and display for the first time. This is also problematic if the datasource gets updated (items removed, added, renamed) because I have to wipe out all the items and create the list again in all active instances.


View 3 Replies View Related

Multiple Instances Of Sqldataadapter, Single Transaction?

Jun 22, 2010

i want to put multiple instances of sqldataadapter into a single transaction. how can i accomplish this?

View 2 Replies View Related

Multiple Instances Of System.IO.Ports.SerialPort?

Jun 3, 2010

How can I make multiple instances of System.IO.Ports.SerialPort and declare them on the fly? I need to monitor multiple RS232 ports based on the EU's selection. EU will select ports e.g. 1,2,6,9,11 and rename them as necessary. Selections will then be stored in a settings file.I would like to declare these at runtime e.g

Com1 is renamed LabelPrinter
Dim comLabelPrinter As New System.IO.Ports.SerialPort
With comLabelPrinter


Or if not, make multiple instances based on the number of ports selected and renamed.The declaration based on the rename would just make it easier to work with but can be committed?

View 1 Replies View Related

Nested Tokens - Multiple Instances In A String

Jun 22, 2010

I would like to use nested tokens, a similar question was asked in this thread [URL While this did address how to do it with a single instance, I was wondering how to do it with multiple instances in a string. ie.

input to textbox1
"I {love|like} {blue|red|orange|pink} its my {favorite|worst} color "

Press a button and would output a random word in the brackets to textbox2/msgbox similar to. "I like red its my favorite color" or "I love pink its my worst color"

View 2 Replies View Related

Office Automation :: Multiple Instances Of Applications

Jan 6, 2010

I am currently writing an application in VB.NET that draws to a Microstation(MS) CAD application. Like Excel, MS has a robust COM object library that can be programed remotely. Hence, I am posting this in the VB Office Automation forum.In the case where the user invokes my program and there are multiple instances of Microstation(MS) open, I need to let the user determine which MS application instance they would like the program to draw to. It could be potentially catastrophic if the program draws to an unintended application/file.So my problem is this, I need to know how to convert an instance of the application that was found by enumerating through the GetProcessByName method in the Process Class, to an "Micros tationDGN. Application" object.I have read the responses to Post 1317219 by jprg. In a response to that Post, (Post 1317389) Mike_R replied;But if you want to actually manipulate the Excel instance via automation in order to create and save a new file, etc., then it's pretty close to impossible to convert an instance that you grab within via the Process class to an Excel.Application instance.

View 3 Replies View Related

Simulating Multiple Instances Of An Embedded Processor

Jan 10, 2012

I'm working on a project which will entail multiple devices, each with an embedded (ARM) processor, communicating. One development approach which I have found useful in the past with projects that only entailed a single embedded processor was develop the code using Visual Studio, divided into three portions:[code]Feeding the embedded compiler/linker the code from parts 1 and 3 yields a hex file that can run on the target system. Running parts 1 and 2 together yields code which can run on the PC, with the benefit of better debugging tools and more precise control over I/O behavior (e.g. I can make the simulation code introduce certain types of random hiccups more easily than I can induce controlled hiccups on real hardware). Target code is written in C, but the simulation environment uses C++ so as to simulate I/O registers. For example, I have a PortArray data structure; the header file for the embedded compiler includes a line like unsigned char LATA @ 0xF89; and my header file for simulation includes #define LATA _IOBIT(f89,1) which in turn invokes a macro that accesses a suitable property of an I/O object, so a statement like LATA |= 4; will read the simulated latch, "or" the read value with 4, and write the new value. To make this work, the target code has to compile under C++ as well as under C, but this mostly isn't a problem. The biggest annoyance is probably with enum types (which behave as integers in C, but have to be coaxed to do so in C++).

Previously, I've used two approaches to making the simulation interactive:Compile and link a DLL with target-application and simulation code, and have VB code in the same project which interacts with it.Compile the target-application code and some simulation code to an EXE with instance of Visual Studio, and use a second instance of Visual Studio for the simulation-UI. Have the two programs communicate via TCP, so nearly all "real" I/O logic is in the simulation program. For example, the aforementioned `LATA |= 4;` would send a "read port 0xF89" command to the TCP port, get the response, process the received value, and send a "write port 0xF89" command with the result.I've found the latter approach to run a tiny bit slower than the former in some cases, but it seems much more convenient for debugging, since I can suspend execution of the unmanaged simulation code while the simulation UI remains responsive. Indeed, for simulating a single target device at a time, I think the latter approach works extremely well. My question is how I should best go about simulating a plurality of target devices (e.g. 16 of them).The difficulty I have is figuring out how to make each simulated instance get its own set of global variables. If I were to compile to an EXE and run one instance of the EXE for each simulated target device, that would work, but I don't know any practical way to maintain debugger support while doing that. Another approach would be to arrange the target code so that everything would compile as one module joined together via #include. For simulation purposes, everything could then be wrapped into a single C++ class, with global variables turning into class-instance variables. That would be a bit more object-oriented, but I really don't like the idea of forcing all the application code to live in one compiled and linked module.What would perhaps be ideal would be if the code could load multiple instances of the DLL, each with its own set of global variables. I have no idea how to do that, however, nor do I know how to make things interact with the debugger. I don't think it's really necessary that all simulated target devices actually execute code simultaneously; it would be perfectly acceptable for simulation instances to use cooperative multitasking. If there were some way of finding out what range of memory holds the global variables, it might be possible to have the 'task-switch' method swap out all of the global variables used by the previously-running instance and swap in the contents applicable to the instance being switched in. Although I'd know how to do that in an embedded context, though, I'd have no idea how to do that on the PC.

Is there any nicer way to allow simulation logic to be paused and examined in VS2010 debugger, while keeping a responsive UI for the simulator front-end, than running the simulator front end and the simulator logic in separate instances of VS2010, if the simulation logic must be written in C and the simulation front end in managed code? For example, is there a way to tell the debugger that when a breakpoint is hit, some or all other threads should be allowed to keep running while the thread that had hit the breakpoint sits paused?If the bulk of the simulation logic must be source-code compatible with an embedded system written in C (so that the same source files can be compiled and run for simulation purposes under VS2010, and then compiled by the embedded-systems compiler for use in real hardware), is there any way to have the VS2010 debugger interact with multiple simulated instances of the embedded device? Assume performance is not likely to be an issue, but the number of instances will be large enough that creating a separate project for each instance would be likely be annoying in the absence of any way to automate the process. I can think of three somewhat-workable approaches, but don't know how to make any of them work really nicely. There's also an approach which would be better if it's possible, but I don't know how to make it work.Wrap all the simulation code within a single C++ class, such that what would be global variables in the target system become class members. I'm leaning toward this approach, but it would seem to require everything to be compiled as a single module, which would annoyingly affect the design of the target system code. Is there any nice way to have code access class instance members as though they were globals, without requiring all functions using such instances to be members of the same module?Compile a separate DLL for each simulated instance (so that e.g. if I want to run up to 16 instances, I would include 16 DLL's in the project, all sharing the same source files). This could work, but every change to the project configuration would have to be repeated 16 times.Compile the simulation logic to an EXE, and run an appropriate number of instances of that EXE. This could work, but I don't know of any convenient way to do things like set a breakpoint common to all instances. Is it possible to have multiple running instances of an EXE attached to a single debugger instance?Load multiple instances of a DLL in such a way that each instance gets its own global variables, while still being accessible in the debugger. This would be nicest if it were possible, but I don't know any way to do so.If I use one VS2010 instance for the front-end, and another for the simulation logic, is there any way to arrange things so that starting code in one will automatically launch the code in the other?

View 2 Replies View Related

Starting Multiple Instances And Storing The Settings?

Jul 11, 2011

I have a VB2010 application that must run as multiple instances on the same PC (it is a controlling/monitoring program of several devices, each instance of the program control one device)

Of course, the same application must save its own setting in different place, one for each device. For example, if I start the application for the device 3, I have to save the setting in a place marked as "3", in this way, when I start the application for device 4 it will load the settings for device 4 and not 3.

Of course all labels and similar stuffs must refer the starting device: i.e. the mdi caption must report "device 4", and so on...

In vb6 I created a shortcut with a command line and made my application accepting command line parameters.

In this way I could start the application passing the device number too. For example "myapp.exe 3" start my application for the device 3.

I stored all settings in several INI file, each one for a device: setting1.ini, setting2.ini, setting3.ini, ....

I was wondering if in vb2010 would be a better way to do that.

1. How could I start multiple instances?

2. How could I store the settings?

View 4 Replies View Related

VS 2005 Multiple Instances Of The Existing Form?

May 7, 2010

I have an MDI parent(MDIParent1) form with a child form(frmMain).The child form got a Tabcontrol(TabControl1) in it.I am trying to load other forms(say form1) in my application to this tabcontrol as tabpages. I use the following code for that


View 2 Replies View Related

VS 2008 Close Multiple Instances Of Form?

Aug 30, 2011

I have 30 instances of the same form running. Video array with different video on each. Each form is named "oneForm". I'm looking for a way to close all forms with one click. I have found that I can hide the forms no problem like this.

for each killfrm as form in my.application.openforms
if = "oneForm" then


View 4 Replies View Related

VS 2008 Resize Multiple Instances Of Same Form?

Jan 15, 2009

Within the subroutine, I am counting the number of open Forms and dividing the bounds of the screen by the number of open forms everytime a button is clicked.his gives me a way to Size each video box perfectly according to the number of forms open.This is where I have found a problem. The size of the new window only sizes the newly opened on and will not resize the ones that are already open. I will give an example of my subroutine.Note: Because of the nature of my program, I am not allowed to take any code out of the work zone and so I will be summarizing what I am doing rather than showing the actual code.

Private videoShow (byval videoName, byval videoIp)
dim videoForm as new form
videoForm.size = New Drawing.Size


View 11 Replies View Related

VS 2010 - Creating Multiple Instances Of Subs

Jul 31, 2011

I'm creating a twitter account manager using the Twitter API. I have multiple accounts, over 10 of them. I want to automate all 10 of these accounts to do certain things, now the way I started to code the program was so that it would accommodate only one account, and all the codes worked perfectly and were managed by individual timers for individual processes that I wanted done. i could tweet between certain intervals, follow people who tweet certain things without me being on top of it.

Now the problem is that I've been trying to create new instances of subs that I've already created so that I dont have to create 10 new subs with the exact same procedures. I'm pretty sure it's impossible to create copies of subs dynamically or within a loop but it didn't stop me from trying. So question is how can I edit a program that was designed to accommodate and automate only one account, to potentially accommodate over a 100? I don't need codes or anything I need ideas so I can try them, but right now I'm completely blank.

View 2 Replies View Related

VS 2010 Have Multiple Object Instances Made At Once?

Jun 23, 2010

Like i have. Dim MainWindow as new Classic.

But i have another i need to Access.

Is there a Way. Ive Tried and Tried. But i can't find a Way to Load another.

View 19 Replies View Related

Lifetime Of Multiple Instances Of An Object / Design Pattern?

Sep 5, 2009

having difficulty with understanding object lifetime / instantiation.I have a windows from with a datagridview and a panel. The datagridview has a checkbox column and a list of names which is populated from a database.The panel has a few text boxes (e.g. name, age, favourite sports team) and a 'save changes' button.

The idea is that when the user selects a person in the datagridview by checking the appropriate checkbox then the panel shows the relevant data for that person (name, age, fav sports team) by pulling the data from a database. If the user would like to update the person's details they can do so by typing in the textboxes and then clicking the 'save changes' button. All quite simple so far.

The way I have designed this is to have a 'panel' class and to create an instance when the user checks a checkbox.(NB - the reason I have created a 'panel' class is that I intend to replicate the datagridview and panel on other tabpages within my form and thought it would be useful to have a generic 'panel' class that I could re-use.)

My code looks a bit like this:

If CheckBoxClicked Then
Dim UpdatePanel As New UpdatePanel(MyForm.NameTextBox, MyForm.AgeTextBox, MyForm.FavSportTeamTextBox, MyForm.SaveButton)

When the user clicks the SaveButton the data is updated to the database and I have a display message (simple textbox) which says "Update successful" and displays for 5 seconds before hiding itself.

Here is the problem:Suppose a user checks a checkbox, reviews the data and does not make any changes, and then checks another checkbox and decides to update the data by clicking the 'save changes' button. What happens is that the "Update successful" message is displayed twice.

I think this is because every time the user checks a checkbox an instance of UpdatePanel is created. If a I select five different people using the checkboxes and then hit 'save changes' I get five "Update successful" messages.

I am not sure how to overcome this. It feels like each time a checkbox is clicked I need to check if an instance of UpdatePanel exists and then destroy it. I tried using UpdatePanel = Nothing and also investigated IDisposable and GC.Collect() but with no luck.


View 1 Replies View Related

Single Instance Application Won't Load Multiple Instances

Dec 13, 2008

I have set the "Make single instance application" check box.And when my application version is for example, it is OK and won't load multiple instances.But when I create a new version, for example, then I can run 2 instances of my application, when the 1st instance is and the second instance is should I do to prevent this?

View 2 Replies View Related

Copyrights 2005-15, All rights reserved