|
Hi,
Use the clone property of the datatable to create seperate instance in memory.
Sample Code
ComboBox1.DataSource = Dataset.DataTable;
ComboBox2.DataSource = Dataset.DataTable.Clone();
ComboBox3.DataSource = Dataset.DataTable.Clone();
ComboBox4.DataSource = Dataset.DataTable.Clone();
ComboBox5.DataSource = Dataset.DataTable.Clone();
ComboBox6.DataSource = Dataset.DataTable.Clone();
Remember the Datatable is a type of Reference Variable.
Regards,
|
|
|
|
|
it doesn't work. with out the clone it works though.
This is the code
cbBp1Position.DataSource = xmlDataSet.Tables[27];
cbBP2Position.DataSource = xmlDataSet.Tables[27].Clone();
|
|
|
|
|
Hi,
I am working on a windows service that monitor a path and does some upload based on the FileWatcher class. As per microsoft, it say that "More than one user Service may run within the same process". Therefore, i created two services (component classes) in my windows service project and added an instance of each to the service to run as shown below:
static void Main()
{
ServiceUtility initUtl = new ServiceUtility(Constants System.ServiceProcess.ServiceBase[] ServicesToRun;
ServicesToRun = new System.ServiceProcess.ServiceBase[] { new exchangeRateFileWatcher(), new KYCFileWatcher() };System.ServiceProcess.ServiceBase.Run(ServicesToRun); }
However, i read that the second service will run only if the first one fails. Can you please tell me whether it is possible (and how) to run the two services within the same process (i.e exe)?
Thank you for your kind help
Carpe diem,
Krg
|
|
|
|
|
datastruct wrote: i read that the second service will run only if the first one fails
That's nonsense. I have service processes running up to eight Services.
|
|
|
|
|
|
Thanks for your kind help Vikas I'll see into it now itself
Carpe diem,
Krg
|
|
|
|
|
While leaving unsaved form, the system should alert the user that the data is not saved and user should get option to save the form before moving out of the form.It is a windows application in .NET framework coded in C#.
|
|
|
|
|
Setting a flag on OnSaveButtonClick event and by handling FormClosing Event I think you can check this one.
class mainForm
{
....
private bool isSaved = false;
...
private void OnSaveButtonClick(object sender, EventArgs e)
{
SaveFile();
isSaved = true;
}
private void On_FormClosing(object sender, EventArgs e)
{
if(!isSaved)
{
MessageBox.Show("Data is not saved!");
e.Cancel = true;
this.Focus();
}
}
...
}
Hope this helps. Good Luck.
|
|
|
|
|
how to remove access database password using c# code.please help me.explain it. thank you.
|
|
|
|
|
lankaudaranga wrote: how to remove access database password using c# code
Without knowing it? Uhm...You're a bad guy!
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
lankaudaranga wrote: how to remove access database password using c# code
You can't, and stop asking the same damn question over and over.
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
Hi,
I have created a windows service which monitors the activities of files on the server. This windows service is using a filesystemwatcher.
Every time there is an activity, i.e. when a file is moved or created, etc., then the system sends an email.
All works fine.
Question:
Imagine something will have to get installed on the server and the user forgot to turn off this windows service. Then as a result, a lot of emails will get sent.
This is what I am trying to avoid (Sending un-necessary emails).
Ideally, the user will turn this windows service off but what if he doesn't? certainly we do not what the system to send so many emails as the result of something being installed which can cause alot of files movements and creations, etc...
Thanks
|
|
|
|
|
Well, if you were stupid enough to set the folder to C:\ and then allow it to watch subfolders for "*.*" as well, you deserve what you get.
How about this... write the service to be more selective about what it's watching for. I know, this might be a huge mental leap for you, but sometimes, programming requires, ummm...., programming.
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
John Simmons / outlaw programmer wrote: but sometimes, programming requires, ummm...., programming.
and I thought I was the only one that had that opinion. It seems many people think programming now only requires Lambda.
led mike
|
|
|
|
|
Maybe a timer is useful here?
|
|
|
|
|
What would you do if someone decided to copy 500 files from somewhere? You need to reconsider your requirements and design.
Bob
Ashfield Consultants Ltd
|
|
|
|
|
Hi,
That will not happen as this system will be used for files which are not supposed to be changed.
Thanks
|
|
|
|
|
arkiboys wrote: That will not happen as this system will be used for files which are not supposed to be changed.
I think what you mean is
That should not happen as this system will be used for files which are not supposed to be changed.
Anyway, back to your original problem. AFAIK an install is the same as copying files (at least to a file watcher), so how about seeing how many changes there are in say 30 seconds and send a single email out listing them? Not a perfect solution but maybe a viable work around?
Bob
Ashfield Consultants Ltd
|
|
|
|
|
Yes, I will try that.
Thank you
|
|
|
|
|
Hi everyone,
I am doing project on parsing a html content or content in a web page,to display any error in web page(i e to find out grammatical mistakes e.g meaning of word or syntax mistake etc)
which has been designed using html.
please help me out if there is any code or logic...it may be in c#,Java,JavaScript etc
|
|
|
|
|
Look at this article[^].
Scott Dorman Microsoft® MVP - Visual C# | MCPD
President - Tampa Bay IASA
[ Blog][ Articles][ Forum Guidelines] Hey, hey, hey. Don't be mean. We don't have to be mean because, remember, no matter where you go, there you are. - Buckaroo Banzai
|
|
|
|
|
Hi,
You can do this using XSLT and XPATH but if the HTML you want to parse is in XHTML format.
Regards,
|
|
|
|
|
Hello,
I want to develop a sample application for Remote Connection.
If you have any kind of link or Sample then please provide me.
Thanks in advance.
Best Regards,
Chetan Patel
|
|
|
|
|
How to create setup for C# Windows Application exe. I have tried uisng the Publish option in the application. The problem is with database path. I have put the database(.mdb) file in a separate folder called database. So in the ConnectionString I have given the database path as @"Provider=Microsoft.Jet.OLEDB.4.0; Data Source =" + Application.StartupPath + @"\Database\dbCIMS.mdb;"
How do I include this database in the Setup using the Publish wizard. When I run the setup it was giving Invalid database path error.
Please help
Thanks in advance
|
|
|
|
|